https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126023
Bug ID: 126023
Summary: [SH] ICE when compiling C++, unable to find a register
to spill
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: paul at crapouillou dot net
Target Milestone: ---
Created attachment 64884
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64884&action=edit
Reproducer for ICE
When compiling the provided test case with
sh-elf-g++ testcase.ii -c -O1 -ml -m4-single
(last two ops are the default of my compiler, not sure they matter)
I get:
testcase.ii:8:1: error: unable to find a register to spill in class 'FP0_REGS'
8 | }
| ^
testcase.ii:8:1: error: this is the insn:
(insn 25 12 14 4 (parallel [
(set (reg:SF 65 fr1 [orig:172 _4 ] [172])
(fma:SF (reg:SF 169 [ y0 ])
(reg:SF 66 fr2 [170])
(reg:SF 65 fr1 [orig:173 BackgroundrenderStep_f4 ] [173])))
(clobber (reg:SI 155 fpscr1))
(use (reg:SI 154 fpscr0))
]) "testcase.ii":5:54 331 {fmasf4_i}
(expr_list:REG_DEAD (reg:SF 65 fr1 [orig:173 BackgroundrenderStep_f4 ]
[173])
(expr_list:REG_DEAD (reg:SF 169 [ y0 ])
(expr_list:REG_UNUSED (reg:SI 155 fpscr1)
(nil)))))
It happens with GCC master, but also with GCC 15.2.0, so it is not a new bug.