https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98791
Bug ID: 98791
Summary: ICE in paradoxical_subreg_p (in ira) with SVE, LTO
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: acoplan at gcc dot gnu.org
Target Milestone: ---
The following fails:
$ cat test.c
extern char a[];
extern long b[];
void c(unsigned d, unsigned long long g[][13]) {
for (int f = 0; f < 24; f += d - 45810) {
a[f] = g[0][2];
b[f] = 0;
}
}
static unsigned long long e[1][13];
int main() { c(45811, e); }
$ aarch64-elf-gcc -flto -O1 -ftree-vectorize -march=armv8.2-a+sve
--param=aarch64-autovec-preference=3 test.c
during RTL pass: ira
test.c: In function 'main':
test.c:10:27: internal compiler error: in paradoxical_subreg_p, at rtl.h:3170
10 | int main() { c(45811, e); }
| ^
0xab2093 paradoxical_subreg_p(machine_mode, machine_mode)
/home/alecop01/toolchain/src/gcc/gcc/rtl.h:3170
0xab2093 narrower_subreg_mode(machine_mode, machine_mode)
/home/alecop01/toolchain/src/gcc/gcc/rtl.h:3200
0xab2093 update_costs_from_allocno
/home/alecop01/toolchain/src/gcc/gcc/ira-color.c:1410
0xab26c5 update_costs_from_copies
/home/alecop01/toolchain/src/gcc/gcc/ira-color.c:1480
0xab3790 assign_hard_reg
/home/alecop01/toolchain/src/gcc/gcc/ira-color.c:1971
0xabc506 pop_allocnos_from_stack
/home/alecop01/toolchain/src/gcc/gcc/ira-color.c:2707
0xabc506 color_allocnos
/home/alecop01/toolchain/src/gcc/gcc/ira-color.c:3251
0xabc506 color_pass
/home/alecop01/toolchain/src/gcc/gcc/ira-color.c:3363
0xaa5ab6 ira_traverse_loop_tree(bool, ira_loop_tree_node*, void
(*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*))
/home/alecop01/toolchain/src/gcc/gcc/ira-build.c:1776
0xab8649 do_coloring
/home/alecop01/toolchain/src/gcc/gcc/ira-color.c:3514
0xab8649 color
/home/alecop01/toolchain/src/gcc/gcc/ira-color.c:4885
0xab8649 ira_color()
/home/alecop01/toolchain/src/gcc/gcc/ira-color.c:5014
0xa9f999 ira
/home/alecop01/toolchain/src/gcc/gcc/ira.c:5654
0xa9f999 execute
/home/alecop01/toolchain/src/gcc/gcc/ira.c:5964
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
lto-wrapper: fatal error: aarch64-elf-gcc returned 1 exit status
compilation terminated.
/home/alecop01/toolchain/build-aarch64-elf/install/lib/gcc/aarch64-elf/11.0.0/../../../../aarch64-elf/bin/ld:
error: lto-wrapper failed
collect2: error: ld returned 1 exit status
The backtrace appears to be the same as PR97092, although that PR doesn't
appear to have regressed (at least for the original testcase).