+2013-04-29 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/57075
+ * tree-inline.c (copy_edges_for_bb): Still split the bbs,
+ even if not adding abnormal edges for calls that can make
+ abnormal gotos.
+
2013-04-29 Richard Biener <rguenther@suse.de>
PR middle-end/57103
--- /dev/null
+/* { dg-do compile } */
+
+extern int baz (void) __attribute__ ((returns_twice));
+int __attribute__ ((__leaf__))
+foo (void)
+{
+ return __builtin_printf ("$");
+}
+
+void
+bar ()
+{
+ foo ();
+ baz ();
+}
into a COMPONENT_REF which doesn't. If the copy
can throw, the original could also throw. */
can_throw = stmt_can_throw_internal (copy_stmt);
- /* If the call we inline cannot make abnormal goto do not add
- additional abnormal edges but only retain those already present
- in the original function body. */
- nonlocal_goto
- = can_make_abnormal_goto && stmt_can_make_abnormal_goto (copy_stmt);
+ nonlocal_goto = stmt_can_make_abnormal_goto (copy_stmt);
if (can_throw || nonlocal_goto)
{
else if (can_throw)
make_eh_edges (copy_stmt);
+ /* If the call we inline cannot make abnormal goto do not add
+ additional abnormal edges but only retain those already present
+ in the original function body. */
+ nonlocal_goto &= can_make_abnormal_goto;
if (nonlocal_goto)
make_abnormal_goto_edges (gimple_bb (copy_stmt), true);