]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/44469 (internal compiler error: in fixup_reorder_chain, at...
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 26 Jan 2011 21:14:27 +0000 (21:14 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Wed, 26 Jan 2011 21:14:27 +0000 (21:14 +0000)
PR rtl-optimization/44469
* cfgcleanup.c (try_optimize_cfg): Iterate in CFG layout mode too
after removing trivially dead basic blocks.

From-SVN: r169305

gcc/ChangeLog
gcc/cfgcleanup.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/20110126-1.c [new file with mode: 0644]

index daba315259dd4606fc514d029563c27f2313b07d..69151dcb61c8566b22d7c3a367e9c3dffa83a055 100644 (file)
@@ -1,3 +1,9 @@
+2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR rtl-optimization/44469
+       * cfgcleanup.c (try_optimize_cfg): Iterate in CFG layout mode too
+       after removing trivially dead basic blocks.
+
 2011-01-25  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/47411
index e63125aec541e0741ea68099334dae38409eb390..c4e65555f7e9690a6ea78da4bc3b715438d3bce9 100644 (file)
@@ -1928,8 +1928,7 @@ try_optimize_cfg (int mode)
                        }
                    }
                  delete_basic_block (b);
-                 if (!(mode & CLEANUP_CFGLAYOUT))
-                   changed = true;
+                 changed = true;
                  /* Avoid trying to remove ENTRY_BLOCK_PTR.  */
                  b = (c == ENTRY_BLOCK_PTR ? c->next_bb : c);
                  continue;
index 7eb83817dadbaac2543feaa09c7d5ea922a69cab..28d35b1afe4aab9f71a11f0ebc20693b94fe0d4b 100644 (file)
@@ -1,3 +1,7 @@
+2011-01-26  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc.c-torture/compile/20110126-1.c: New test.
+
 2011-01-25  Tobias Burnus  <burnus@net-b.de>
 
        Backport from mainline
diff --git a/gcc/testsuite/gcc.c-torture/compile/20110126-1.c b/gcc/testsuite/gcc.c-torture/compile/20110126-1.c
new file mode 100644 (file)
index 0000000..c55e0c2
--- /dev/null
@@ -0,0 +1,18 @@
+/* PR rtl-optimization/44469 */
+/* Testcase by Siarhei Siamashka <siarhei.siamashka@gmail.com> */
+
+int a (int *t, const char *p)
+{
+  if (*t == 0)
+    {
+    }
+  else if (*t == 1)
+    {
+      p = (const char *)t;
+    }
+  else
+    __builtin_unreachable();
+  if (p[0])
+    return 0;
+  return 1;
+}