]> gcc.gnu.org Git - gcc.git/commitdiff
re PR tree-optimization/57075 (verify_flow_info failed: control flow in the middle...
authorRichard Biener <rguenther@suse.de>
Mon, 29 Apr 2013 15:06:18 +0000 (15:06 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 29 Apr 2013 15:06:18 +0000 (15:06 +0000)
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.

* gcc.dg/torture/pr57075.c: New testcase.

From-SVN: r198423

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr57075.c [new file with mode: 0644]
gcc/tree-inline.c

index b84161bf16395620d4e9104e0b769fcc44d43b8b..38074dab23fad34ab4d6b96a4b6d62539d1c4507 100644 (file)
@@ -1,3 +1,10 @@
+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
index 166d4e028ce9cc63374f9f8d021266ee653bec7b..3364efcb30da4afda3c7c80bcccb3d50a4550c67 100644 (file)
@@ -1,3 +1,8 @@
+2013-04-29  Richard Biener  <rguenther@suse.de>
+
+       PR middle-end/57075
+       * gcc.dg/torture/pr57075.c: New testcase.
+
 2013-04-29  Richard Biener  <rguenther@suse.de>
 
        PR middle-end/57103
diff --git a/gcc/testsuite/gcc.dg/torture/pr57075.c b/gcc/testsuite/gcc.dg/torture/pr57075.c
new file mode 100644 (file)
index 0000000..dee74a8
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+extern int baz (void) __attribute__ ((returns_twice));
+int __attribute__ ((__leaf__))
+foo (void)
+{
+  return __builtin_printf ("$");
+}
+
+void
+bar ()
+{
+  foo ();
+  baz ();
+}
index 69455cebf791178d5c5f9a5878973239d4fca458..35cdb787538c4af650b315a5e1c868d0b8d1ea9f 100644 (file)
@@ -1923,11 +1923,7 @@ copy_edges_for_bb (basic_block bb, gcov_type count_scale, basic_block ret_bb,
          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)
        {
@@ -1955,6 +1951,10 @@ copy_edges_for_bb (basic_block bb, gcov_type count_scale, basic_block ret_bb,
       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);
 
This page took 0.088124 seconds and 5 git commands to generate.