https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85412

--- Comment #8 from Andrey Belevantsev <abel at gcc dot gnu.org> ---
Sigh.  We set reset_sched_cycles_p to pipelining_p after the conditional, but
we have missed that in sel_sched_region_1 pipelining_p will be set to false. 
So that initial patch should have the following hunk instead:

diff --git a/gcc/sel-sched.c b/gcc/sel-sched.c
index 315f2c0c0ab..29d9abd7200 100644
--- a/gcc/sel-sched.c
+++ b/gcc/sel-sched.c
@@ -7648,11 +7648,11 @@ sel_sched_region (int rgn)
       /* Schedule always selecting the next insn to make the correct data
         for bundling or other later passes.  */
       pipelining_p = false;
+      reset_sched_cycles_p = false;
       force_next_insn = 1;
       sel_sched_region_1 ();
       force_next_insn = 0;
     }
-  reset_sched_cycles_p = pipelining_p;
   sel_region_finish (reset_sched_cycles_p);
 }

I've checked that it fixes the ICE on the original revision, trunk doesn't ICE
for me.

Reply via email to