https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106462
Bug ID: 106462 Summary: LRA on mips64el: unable to reload (subreg:SI (reg:DI)) constrained by "f" Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: yangyujie at loongson dot cn Target Milestone: --- Created attachment 53368 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53368&action=edit -freport-bug dump Hi, compiling the following code with gcc 13.0.0 20220728 (mips64el-linux-gnuabi64): extern void bar (float x, short y); void foo (int argc) { short c = argc * 2; float a = (float)(short)c, b = 9.5; bar (b/a, c); } failed with: mips64el-linux-gnuabi64-gcc fail.c -O1 -mabi=64 -msingle-float -S -o /dev/null fail.c: In function 'foo': fail.c:9:1: error: unable to find a register to spill 9 | } | ^ fail.c:9:1: error: this is the insn: (insn 12 27 15 2 (set (reg:SF 202 [ a ]) (float:SF (subreg/s/u:SI (reg/v:DI 209 [orig:197 c ] [197]) 0))) "fail.c":6:11 270 {floatsisf2} (expr_list:REG_DEAD (reg/v:DI 209 [orig:197 c ] [197]) (nil))) during RTL pass: reload fail.c:9:1: internal compiler error: in lra_split_hard_reg_for, at lra-assigns.cc:1871 Please submit a full bug report, with preprocessed source. See <https://gcc.gnu.org/bugs/> for instructions. Preprocessed source stored into /tmp/ccZs64gB.out file, please attach this to your bugreport. This bug is also reproducible on gcc-8.3.0, so it seems to be around for quite a while.