https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70978
Bug ID: 70978
Summary: [5 Regression] internal compiler error: in
assign_by_spills, at lra-assigns.c:1428 on arm
Product: gcc
Version: 5.3.1
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: ktkachov at gcc dot gnu.org
Target Milestone: ---
Target: arm*
Created attachment 38426
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38426&action=edit
Reduced testcase
The attached testcases ICEs in LRA on the GCC 5 branch when compiled with
-S -O3 -mfloat-abi=hard -mcpu=cortex-a57 -mfpu=neon-fp-armv8.
../reduced.c: In function 'f2':
../reduced.c:36:5: warning: implicit declaration of function 'f3'
[-Wimplicit-function-declaration]
f3 (f, f3, m);
^
../reduced.c:80:1: error: unable to find a register to spill
}
^
../reduced.c:80:1: error: this is the insn:
(insn 242 241 33 4 (set (reg:SI 246)
(plus:SI (reg:SI 243)
(reg:SI 245))) ../reduced.c:40 4 {*arm_addsi3}
(expr_list:REG_DEAD (reg:SI 245)
(expr_list:REG_DEAD (reg:SI 243)
(nil))))
../reduced.c:80:1: internal compiler error: in assign_by_spills, at
lra-assigns.c:1428
0xa67cfa _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
$SRC/gcc/rtl-error.c:110
0x987cfc assign_by_spills
$SRC/gcc/lra-assigns.c:1428
0x987cfc lra_assign()
$SRC/gcc/lra-assigns.c:1603
0x98424f lra(_IO_FILE*)
$SRC/gcc/lra.c:2389
0x94576c do_reload
$SRC/gcc/ira.c:5422
0x94576c execute
$SRC/gcc/ira.c:5593
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
This doesn't happen on trunk, GCC 6, or 4.9.
Bisection on the branch showed that it started with r233454, a backport of a
trunk patch.
However, that patch is very unlikely to be the cause of this, but rather seems
to expose a latent bug, perhaps in LRA. I haven't been able to reproduce this
on trunk by going to the same revision that r233454 backports.