* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140123
138bc75d-0d04-0410-961f-
82ee72b054a4
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.
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.
--- /dev/null
+// 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");
+}
gimple_call_set_lhs (new_call, gimple_call_lhs (stmt));
gsi_replace (©_gsi, new_call, false);
+ gimple_set_bb (stmt, NULL);
stmt = new_call;
}
else if (is_gimple_call (stmt)