http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54456
--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-09-02 20:06:46 UTC --- Any specialist of selective scheduling interested here? Otherwise: Index: sched-rgn.c =================================================================== --- sched-rgn.c (revision 190863) +++ sched-rgn.c (working copy) @@ -3473,7 +3473,7 @@ static bool gate_handle_sched (void) { #ifdef INSN_SCHEDULING - return flag_schedule_insns && dbg_cnt (sched_func); + return optimize > 0 && flag_schedule_insns && dbg_cnt (sched_func); #else return 0; #endif is certainly good enough and would eliminate this whole class of ICEs.