re PR rtl-optimization/26725 (ICE in check_reg_live, at haifa-sched.c:4645 with ...
authorRichard Sandiford <richard@codesourcery.com>
Tue, 25 Apr 2006 21:34:48 +0000 (21:34 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 25 Apr 2006 21:34:48 +0000 (21:34 +0000)
gcc/
PR rtl-optimization/26725
* cfgrtl.c (rtl_redirect_edge_and_branch_force): Set the source
block's BB_DIRTY flag.

gcc/testsuite/
* gcc.c-torture/compile/pr26725.c: New test.

From-SVN: r113257

gcc/ChangeLog
gcc/cfgrtl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr26725.c [new file with mode: 0644]

index e6b524eb9b5f04b0d1f8b88b88b1c28751c87533..9c6499e89732a99b7de18167dcfef37da7035a22 100644 (file)
@@ -1,3 +1,9 @@
+2006-04-25  Richard Sandiford  <richard@codesourcery.com>
+
+       PR rtl-optimization/26725
+       * cfgrtl.c (rtl_redirect_edge_and_branch_force): Set the source
+       block's BB_DIRTY flag.
+
 2006-04-25  Geoffrey Keating  <geoffk@apple.com>
 
        * dwarf2asm.c (dw2_asm_output_data): Don't generate RTL just
index b4875d2b3352e371f109c89ab773607dd0a5ccae..54f355e6dfd9dd7a48c04202da12f499ca90171a 100644 (file)
@@ -1170,6 +1170,7 @@ rtl_redirect_edge_and_branch_force (edge e, basic_block target)
 
   /* In case the edge redirection failed, try to force it to be non-fallthru
      and redirect newly created simplejump.  */
+  e->src->flags |= BB_DIRTY;
   return force_nonfallthru_and_redirect (e, target);
 }
 
index 6db2d342c280ede74a9bf8e7e180e374a1e51b39..4f4944eff2fe4cb88e73d40452f39e171995e7a4 100644 (file)
@@ -1,3 +1,8 @@
+2006-04-25  Richard Sandiford  <richard@codesourcery.com>
+
+       PR rtl-optimization/26725
+       * gcc.c-torture/compile/pr26725.c: New test.
+
 2006-04-25  Richard Guenther  <rguenther@suse.de>
 
        * gcc.dg/tree-prof/val-prof-2.c: Check for n + ffff rather  
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr26725.c b/gcc/testsuite/gcc.c-torture/compile/pr26725.c
new file mode 100644 (file)
index 0000000..934042a
--- /dev/null
@@ -0,0 +1,15 @@
+struct { unsigned int num; } *numptr;
+void notice (int);
+void doit (unsigned int *);
+
+void
+rewrite_finalize_block (int x)
+{
+  unsigned int *tmp;
+  while (tmp = (numptr ? &numptr->num : 0), (tmp ? *tmp : 0) > 0)
+    {
+      tmp = (numptr ? &numptr->num : 0);
+      (void) (*tmp ? 0 : notice (x));
+      doit (tmp);
+    }
+}