https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83712
Bug ID: 83712
Summary: "Unable to find a register to spill" when compiling
for thumb1
Product: gcc
Version: 7.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: mikulas at artax dot karlin.mff.cuni.cz
Target Milestone: ---
Created attachment 43050
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43050&action=edit
a reduced testcase for gcc bug
I get the following error when attempting co compile the attached file with:
$ arm-linux-gnueabi-gcc-7 -mfloat-abi=softfp -mthumb -march=armv5t -O2
kbd-min.c
kbd-min.c: In function ‘handle_trm’:
kbd-min.c:23:1: error: unable to find a register to spill
}
^
kbd-min.c:23:1: error: this is the insn:
(insn 17 43 44 2 (parallel [
(set (mem:SI (reg/f:SI 129 [121]) [0 S4 A32])
(mem:SI (reg/f:SI 135 [120]) [0 S4 A32]))
(set (mem:SI (plus:SI (reg/f:SI 129 [121])
(const_int 4 [0x4])) [0 S4 A32])
(mem:SI (plus:SI (reg/f:SI 135 [120])
(const_int 4 [0x4])) [0 S4 A32]))
(set (mem:SI (plus:SI (reg/f:SI 129 [121])
(const_int 8 [0x8])) [0 S4 A32])
(mem:SI (plus:SI (reg/f:SI 135 [120])
(const_int 8 [0x8])) [0 S4 A32]))
(set (reg/f:SI 129 [121])
(plus:SI (reg/f:SI 129 [121])
(const_int 12 [0xc])))
(set (reg/f:SI 135 [120])
(plus:SI (reg/f:SI 135 [120])
(const_int 12 [0xc])))
(clobber (reg:SI 126))
(clobber (reg:SI 127))
(clobber (reg:SI 128))
]) "kbd-min.c":16 836 {movmem12b}
(expr_list:REG_UNUSED (reg:SI 128)
(expr_list:REG_UNUSED (reg:SI 127)
(expr_list:REG_UNUSED (reg:SI 126)
(nil)))))
kbd-min.c:23: confused by earlier errors, bailing out
I reproduced the bug on gcc-4.8.4, gcc-6.3.0, gcc-7.2.0.