re PR rtl-optimization/33648 (ICE in verify_flow_info for -fmodulo-sched -freorder...
authorJakub Jelinek <jakub@redhat.com>
Thu, 1 Nov 2007 23:27:23 +0000 (00:27 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 1 Nov 2007 23:27:23 +0000 (00:27 +0100)
PR rtl-optimization/33648
* cfgrtl.c (cfg_layout_split_edge): Initialize BB_PARTITION of
the newly created basic block.

* gcc.dg/pr33648.c: New test.

From-SVN: r129837

gcc/ChangeLog
gcc/cfgrtl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr33648.c [new file with mode: 0644]

index 72c10211dea34bef6946f2d14479671b1245d9c1..d164186e3723c80bc4827245379010f27dbc143e 100644 (file)
@@ -1,3 +1,9 @@
+2007-11-02  Jakub Jelinek  <jakub@redhat.com>
+
+       PR rtl-optimization/33648
+       * cfgrtl.c (cfg_layout_split_edge): Initialize BB_PARTITION of
+       the newly created basic block.
+
 2007-11-01  Richard Guenther  <rguenther@suse.de>
 
        * ggc-page.c (extra_order_size_tab): Add bitmap_head size.
index d261b03eb9b669f365fbe3beebc11feeb882ddb3..b5a432e2e8b6fef5f3029b2bb82ba10b3611e642 100644 (file)
@@ -2696,6 +2696,10 @@ cfg_layout_split_edge (edge e)
                        ? NEXT_INSN (BB_END (e->src)) : get_insns (),
                        NULL_RTX, e->src);
 
+  if (e->dest == EXIT_BLOCK_PTR)
+    BB_COPY_PARTITION (new_bb, e->src);
+  else
+    BB_COPY_PARTITION (new_bb, e->dest);
   make_edge (new_bb, e->dest, EDGE_FALLTHRU);
   redirect_edge_and_branch_force (e, new_bb);
 
index 849f07ee3aab561c1ed54865f25661e8b694b193..dc4591b451cd2538b6df3d607f3571117bf45fe9 100644 (file)
@@ -1,3 +1,8 @@
+2007-11-02  Jakub Jelinek  <jakub@redhat.com>
+
+       PR rtl-optimization/33648
+       * gcc.dg/pr33648.c: New test.
+
 2007-11-01  Jakub Jelinek  <jakub@redhat.com>
 
        PR c++/32384
diff --git a/gcc/testsuite/gcc.dg/pr33648.c b/gcc/testsuite/gcc.dg/pr33648.c
new file mode 100644 (file)
index 0000000..b5d46b7
--- /dev/null
@@ -0,0 +1,13 @@
+/* PR rtl-optimization/33648 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fmodulo-sched -freorder-blocks-and-partition" } */
+
+unsigned res;
+
+void
+foo (unsigned code, int len)
+{
+  int i;
+  for (i = 0; i < len; i++)
+    res |= code & 1;
+}