Commit aa792834 by Alexandre Oliva Committed by Alexandre Oliva

re PR middle-end/33706 (gcc_assert failure in verify_eh_edges)

gcc/ChangeLog:
PR middle-end/33706
* tree-inline.c (copy_bb): Use bsi_replace to replace a
__builtin_va_arg_pack-containing call stmt.
gcc/testsuite/ChangeLog:
PR middle-end/33706
* gcc.dg/va-arg-pack-2.c: New.

From-SVN: r129355
parent 608a3be9
2007-10-15 Alexandre Oliva <aoliva@redhat.com>
PR middle-end/33706
* tree-inline.c (copy_bb): Use bsi_replace to replace a
__builtin_va_arg_pack-containing call stmt.
2007-10-15 Razya Ladelsky <razya@il.ibm.com> 2007-10-15 Razya Ladelsky <razya@il.ibm.com>
* matrix-reorg.c (gate_matrix_reorg): Don't comment out whole * matrix-reorg.c (gate_matrix_reorg): Don't comment out whole
2007-10-15 Alexandre Oliva <aoliva@redhat.com>
PR middle-end/33706
* gcc.dg/va-arg-pack-2.c: New.
2007-10-15 Jakub Jelinek <jakub@redhat.com> 2007-10-15 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/33619 PR tree-optimization/33619
/* { dg-do compile } */
/* { dg-options "-O2" } */
extern void noreturn (int status, ...);
extern inline __attribute ((always_inline)) void
error (int status, ...)
{
if (__builtin_constant_p (status))
noreturn (status, __builtin_va_arg_pack ());
}
void
f (void)
{
error (1);
}
...@@ -863,9 +863,18 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale, int count_scal ...@@ -863,9 +863,18 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale, int count_scal
if (TREE_CODE (*call_ptr) == WITH_SIZE_EXPR) if (TREE_CODE (*call_ptr) == WITH_SIZE_EXPR)
call_ptr = &TREE_OPERAND (*call_ptr, 0); call_ptr = &TREE_OPERAND (*call_ptr, 0);
gcc_assert (*call_ptr == call); gcc_assert (*call_ptr == call);
*call_ptr = new_call; if (call_ptr == stmtp)
stmt = *stmtp; {
update_stmt (stmt); bsi_replace (&copy_bsi, new_call, true);
stmtp = bsi_stmt_ptr (copy_bsi);
stmt = *stmtp;
}
else
{
*call_ptr = new_call;
stmt = *stmtp;
update_stmt (stmt);
}
} }
else if (call else if (call
&& id->call_expr && id->call_expr
......
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