------- Comment #4 from ebotcazou at gcc dot gnu dot org 2006-09-12 20:00 ------- > The invalid REG_DEAD note triggered an ICE during sched1 with a 4.1.1 > based compiler with ENABLE_CHECKING set, compiling for sh4-elf with -O2 > -fno-exceptions. > > I can replicate the invalid REG_DEAD note with vanilla 4.1-2006-03-21, > although of course it won't ICE, since checking is disabled.
Thanks, I can replicate with current 4.1 branch. > This insn appears in the combine dump: > > (insn 13 8 14 0 (set (reg:QI 162) > (mem:QI (post_inc:SI (reg/v/f:SI 159 [ a ])) [0 S1 A8])) 182 {movqi_i} > ( > insn_list:REG_DEP_TRUE 6 (nil)) > (expr_list:REG_UNUSED (reg:QI 162) > (expr_list:REG_DEAD (reg/v/f:SI 159 [ a ]) > (expr_list:REG_INC (reg/v/f:SI 159 [ a ]) > (nil))))) OK, I agree that the REG_DEAD note should have been turned into a REG_UNUSED note here. But of course changing PATTERN (tem) into tem at the hot spot is enough to fix that so it would be nice to have a testcase for the global reg case. Also note that the ChangeLog entry doesn't even mention global regs. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28965