gcc/
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 25 Apr 2006 21:34:48 +0000 (21:34 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 25 Apr 2006 21:34:48 +0000 (21:34 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113257 138bc75d-0d04-0410-961f-82ee72b054a4

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

index e6b524e..9c6499e 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 b4875d2..54f355e 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 6db2d34..4f4944e 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);
+    }
+}