http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49206
Summary: RA failure in spill_failure, at reload1.c:2113 Product: gcc Version: 4.5.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: arthur.j.odw...@gmail.com Created attachment 24383 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24383 Output of "ajo-gcc -O2 -w -c test.c -v" This register-allocator failure reproduces for me with svn revision 173843 (2011-05-17), and also with gcc 4.5.1. It doesn't reproduce with gcc 4.4.5. I'm on Ubuntu 10.10, x86-64. cat >test.c <<EOF struct S1 { short f0; }; extern volatile struct S1 g_5; extern int g_120, i; extern short g_339; int func_72(int x, int y, struct S1 z) { for (z.f0 = -3; z.f0 > 16; z.f0 += 1) foo(); return g_120; } int main() { while (g_339 % 0x200003) continue; if (i) func_72(0, 0, g_5); foo(&g_339); return 0; } EOF gcc -O2 -w -c test.c test.c: In function ‘main’: test.c:17:1: error: unable to find a register to spill in class ‘DREG’ test.c:17:1: error: this is the insn: (insn 7 6 8 2 (parallel [ (set (reg:SI 2 cx [64]) (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (reg:SI 4 si [orig:61 pretmp.11 ] [61])) (sign_extend:DI (reg:SI 2 cx [66]))) (const_int 32 [0x20])))) (clobber (scratch:SI)) (clobber (reg:CC 17 flags)) ]) test.c:12 343 {*smulsi3_highpart_1} (expr_list:REG_DEAD (reg:SI 2 cx [66]) (expr_list:REG_UNUSED (reg:CC 17 flags) (expr_list:REG_EQUAL (truncate:SI (lshiftrt:DI (mult:DI (sign_extend:DI (reg:SI 4 si [orig:61 pretmp.11 ] [61])) (const_int 2147480577 [0x7ffff401])) (const_int 32 [0x20]))) (nil))))) test.c:17:1: internal compiler error: in spill_failure, at reload1.c:2113 This test case is reduced from the output of Csmith 2.1.0 (git hash 01aa8b04, https://github.com/Quuxplusone/csmith/), using the following command line: csmith --paranoid --longlong --no-pointers --no-arrays --jumps --consts --volatiles --checksum --no-divs --muls --no-bitfields --no-packed-struct -s 855007444