re PR middle-end/37393 (error: EH edge 10->12 is missing)

PR middle-end/37393
	* tree-inline.c (copy_bb): When replacing a gimple_call_va_arg_pack_p
	call stmt by new_call, clear gimple_bb on stmt after gsi_replace.

	* g++.dg/tree-ssa/pr37393.C: New test.

From-SVN: r140123
This commit is contained in:
Jakub Jelinek 2008-09-08 23:31:36 +02:00 committed by Jakub Jelinek
parent 7f4b6d207c
commit 9cfa22be65
4 changed files with 35 additions and 0 deletions

View File

@ -1,5 +1,9 @@
2008-09-08 Jakub Jelinek <jakub@redhat.com>
PR middle-end/37393
* tree-inline.c (copy_bb): When replacing a gimple_call_va_arg_pack_p
call stmt by new_call, clear gimple_bb on stmt after gsi_replace.
PR middle-end/37414
* predict.c (optimize_function_for_size_p): Don't segfault if
FUN is NULL.

View File

@ -1,5 +1,8 @@
2008-09-08 Jakub Jelinek <jakub@redhat.com>
PR middle-end/37393
* g++.dg/tree-ssa/pr37393.C: New test.
PR middle-end/37414
* g++.dg/opt/init2.C: New test.

View File

@ -0,0 +1,27 @@
// PR middle-end/37393
// { dg-do compile }
// { dg-options "-O2" }
struct A
{
~A ();
bool foo () const;
};
extern "C"
{
extern void bar (const char *, ...) __attribute__ ((noreturn));
extern inline __attribute__ ((always_inline, gnu_inline, artificial)) void
baz (const char *fmt, ...)
{
bar (fmt, __builtin_va_arg_pack ());
}
};
void
test ()
{
A a;
if (a.foo ())
baz ("foo");
}

View File

@ -1331,6 +1331,7 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale,
gimple_call_set_lhs (new_call, gimple_call_lhs (stmt));
gsi_replace (&copy_gsi, new_call, false);
gimple_set_bb (stmt, NULL);
stmt = new_call;
}
else if (is_gimple_call (stmt)