Commit c0893ec0 by Andrew Pinski Committed by Andrew Pinski

re PR middle-end/30253 (ICE with statement expression inside a conditional)

2007-01-01  Andrew Pinski  <pinskia@gmail.com>

        PR middle-end/30253
        * gimplify (voidify_wrapper_expr): Update for
        GIMPLIFY_MODIFY_STMT.

2007-01-01  Andrew Pinski  <pinskia@gmail.com>

        PR middle-end/30253
        * gcc.c-torture/compile/statement-expression-1.c: New test.

From-SVN: r120321
parent ae1e2d4c
2007-01-01 Andrew Pinski <pinskia@gmail.com>
PR middle-end/30253
* gimplify (voidify_wrapper_expr): Update for
GIMPLIFY_MODIFY_STMT.
2007-01-01 Andreas Schwab <schwab@suse.de> 2007-01-01 Andreas Schwab <schwab@suse.de>
PR target/29166 PR target/29166
......
...@@ -1014,8 +1014,9 @@ voidify_wrapper_expr (tree wrapper, tree temp) ...@@ -1014,8 +1014,9 @@ voidify_wrapper_expr (tree wrapper, tree temp)
/* The wrapper is on the RHS of an assignment that we're pushing /* The wrapper is on the RHS of an assignment that we're pushing
down. */ down. */
gcc_assert (TREE_CODE (temp) == INIT_EXPR gcc_assert (TREE_CODE (temp) == INIT_EXPR
|| TREE_CODE (temp) == GIMPLIFY_MODIFY_STMT
|| TREE_CODE (temp) == MODIFY_EXPR); || TREE_CODE (temp) == MODIFY_EXPR);
TREE_OPERAND (temp, 1) = *p; GENERIC_TREE_OPERAND (temp, 1) = *p;
*p = temp; *p = temp;
} }
else else
......
2007-01-01 Andrew Pinski <pinskia@gmail.com>
PR middle-end/30253
* gcc.c-torture/compile/statement-expression-1.c: New test.
2007-01-01 Andreas Schwab <schwab@suse.de> 2007-01-01 Andreas Schwab <schwab@suse.de>
PR target/29166 PR target/29166
/* PR middle-end/30253, We would ICE with statement expressions
in a conditional expression because we forgot to update the wrapper
function for the gimple modify statement. */
#define f(x) ({ unsigned tmp=x; tmp; })
unsigned foo(unsigned x) {
return __builtin_constant_p(x) ? 0 : f(x);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment