[Bug rtl-optimization/45570] [4.6 Regression] ICE: in cfg_preds_1, at sel-sched-ir.c:4584

abel at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Sep 28 16:20:00 GMT 2010


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45570

Andrey Belevantsev <abel at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2010.09.28 13:23:13
               date|                            |
     Ever Confirmed|0                           |1

--- Comment #3 from Andrey Belevantsev <abel at gcc dot gnu.org> 2010-09-28 13:23:13 UTC ---
Confirmed.  It is hidden now by 163998.
The problem is simple, yet again when inserting a bookkeeping code together
with pipelining outer loops, we can see the situation when we need to devise a
positive seqno for a bookkeeping insn, yet we can't do that by examining its
neighbours.  Fixed by relaxing the failing assert so that the first patch for
PR40101 would provide an arbitrary positive value.

diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c
index 853205d..8a88c55 100644
--- a/gcc/sel-sched-ir.c
+++ b/gcc/sel-sched-ir.c
@@ -4580,8 +4580,12 @@ cfg_preds_1 (basic_block bb, insn_t **preds, int *n, int
*size)
       basic_block pred_bb = e->src;
       insn_t bb_end = BB_END (pred_bb);

-      /* ??? This code is not supposed to walk out of a region.  */
-      gcc_assert (in_current_region_p (pred_bb));
+      if (!in_current_region_p (pred_bb))
+    {
+      gcc_assert (flag_sel_sched_pipelining_outer_loops
+              && current_loop_nest);
+      continue;
+    }

       if (sel_bb_empty_p (pred_bb))
     cfg_preds_1 (pred_bb, preds, n, size);
@@ -4594,7 +4598,9 @@ cfg_preds_1 (basic_block bb, insn_t **preds, int *n, int
*size)
     }
     }

-  gcc_assert (*n != 0);
+  gcc_assert (*n != 0
+          || (flag_sel_sched_pipelining_outer_loops
+          && current_loop_nest));
 }

 /* Find all predecessors of BB and record them in PREDS and their number



More information about the Gcc-bugs mailing list