Hi, compiling linux-2.6.24 for sparc fails with: sparc-elf-gcc -c -O2 netdev-delta.c -mno-fpu" netdev.c-11.i: In function 'e1000e_update_stats': netdev.c-11.i:84: error: unable to find a register to spill in class 'FP_REGS' netdev.c-11.i:84: error: this is the insn: (insn 166 123 140 4 netdev.c-11.i:76 (set (reg:DI 262 [ <variable>.stats.ptc1522 ]) (mem/s:DI (plus:SI (reg/v/f:SI 26 %i2 [orig:121 adapter ] [121]) (reg:SI 24 %i0 [244])) [15 <variable>.stats.ptc1522+0 S8 A64])) 45 {*movdi_insn_sp32} (expr_list:REG_EQUIV (mem/s:DI (plus:SI (reg/v/f:SI 26 %i2 [orig:121 adapter ] [121]) (reg:SI 24 %i0 [244])) [15 <variable>.stats.ptc1522+0 S8 A64]) (nil))) netdev.c-11.i:84: confused by earlier errors, bailing out rev: 133439
Created attachment 15359 [details] delta-reduced
Fails in trunk (133803) too
Some random config of the linux kernel, as of 2.6.36-rc3 results on the following stat.c: In function 'show_stat': stat.c:123:1: error: unable to find a register to spill in class 'FP_REGS' stat.c:123:1: error: this is the insn: (insn 43 49 50 3 stat.c:43 (set (reg:DI 281 [ D.14392_45->cpustat.user ]) (mem/s:DI (plus:SI (reg:SI 25 %i1 [orig:500 __ptr ] [500]) (reg:SI 15 %o7 [orig:128 D.16865 ] [128])) [7 D.14392_45->cpustat.user+0 S8 A64])) 46 {*movdi_insn_sp32} (expr_list:REG_EQUIV (mem/s:DI (plus:SI (reg:SI 25 %i1 [orig:500 __ptr ] [500]) (reg:SI 15 %o7 [orig:128 D.16865 ] [128])) [7 D.14392_45->cpustat.user+0 S8 A64]) (nil))) the (already) attached testcase still fails with gcc 4.5.2.
This ICEs for me with 4.4-20100907 and the 4.5.1 release (-m32 -mno-fpu), but not with 4.5-20100902 or 4.6-20100904.
(In reply to comment #4) > This ICEs for me with 4.4-20100907 and the 4.5.1 release (-m32 -mno-fpu), but > not with 4.5-20100902 or 4.6-20100904. Oops, that was with a locally modified 4.5-20100902. A vanilla 4.5-20100902 still ICEs.
This ICE stopped to appear on trunk with r162019: http://gcc.gnu.org/ml/gcc-cvs/2010-07/msg00373.html http://gcc.gnu.org/ml/gcc-patches/2010-07/msg00827.html Applying the generic bits of that to current 4.5 stops the ICE there too. I can't say if r162019 is a genuine bug fix or merely improves things a bit so that this test case no longer triggers the ICE.
Investigating.
Subject: Bug 35664 Author: ebotcazou Date: Wed Sep 22 08:31:14 2010 New Revision: 164512 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164512 Log: PR target/35664 * config/sparc/constraints.md ('e'): Return NO_REGS if !TARGET_FPU. ('f'): Likewise. Added: trunk/gcc/testsuite/gcc.target/sparc/mnofpu.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/sparc/constraints.md trunk/gcc/testsuite/ChangeLog
Subject: Bug 35664 Author: ebotcazou Date: Wed Sep 22 08:34:11 2010 New Revision: 164513 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164513 Log: PR target/35664 * config/sparc/constraints.md ('e'): Return NO_REGS if !TARGET_FPU. ('f'): Likewise. Added: branches/gcc-4_5-branch/gcc/testsuite/gcc.target/sparc/mnofpu.c - copied unchanged from r164512, trunk/gcc/testsuite/gcc.target/sparc/mnofpu.c Modified: branches/gcc-4_5-branch/gcc/ChangeLog branches/gcc-4_5-branch/gcc/config/sparc/constraints.md branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
Subject: Bug 35664 Author: ebotcazou Date: Wed Sep 22 08:36:35 2010 New Revision: 164514 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164514 Log: PR target/35664 * config/sparc/constraints.md ('e'): Return NO_REGS if !TARGET_FPU. ('f'): Likewise. Added: branches/gcc-4_4-branch/gcc/testsuite/gcc.target/sparc/mnofpu.c - copied unchanged from r164513, trunk/gcc/testsuite/gcc.target/sparc/mnofpu.c Modified: branches/gcc-4_4-branch/gcc/ChangeLog branches/gcc-4_4-branch/gcc/config/sparc/constraints.md branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
In 4.4.5 and up.