The following code snippet causes an ICE on x86_64-unknown-linux-gnu when compiled with "-fschedule-insns -fstack-protector-all". This happens since 4.1.0 when -fstack-protector-all was introduced. ========================================================================= int foo(int i) { i /= i+1; return 0; } ========================================================================= bug.c: In function 'foo': bug.c:5: error: unable to find a register to spill in class 'AREG' bug.c:5: error: this is the insn: (insn 11 21 27 2 (parallel [ (set (reg:SI 1 dx [61]) (div:SI (reg:SI 1 dx [orig:63 i ] [63]) (reg:SI 2 cx [orig:59 D.1879 ] [59]))) (set (reg:SI 2 cx [62]) (mod:SI (reg:SI 1 dx [orig:63 i ] [63]) (reg:SI 2 cx [orig:59 D.1879 ] [59]))) (clobber (reg:CC 17 flags)) ]) 277 {*divmodsi4_nocltd} (nil) (expr_list:REG_DEAD (reg:SI 1 dx [orig:63 i ] [63]) (expr_list:REG_DEAD (reg:SI 2 cx [orig:59 D.1879 ] [59]) (expr_list:REG_UNUSED (reg:CC 17 flags) (expr_list:REG_UNUSED (reg:SI 2 cx [62]) (nil)))))) bug.c:5: internal compiler error: in spill_failure, at reload1.c:1912 Please submit a full bug report, [etc.]
This is the normal problem of using specific registers for multiplication on x86 and x86_64 so running out of registers is easy :).
*** Bug 37659 has been marked as a duplicate of this bug. ***
The code compiles without ICE on trunk since at least 2009-09-17. So lets close it as fixed.