https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123784
Bug ID: 123784
Summary: [14/15/16 Regression] during RTL pass: early_ra ICE:
in operator[], at vec.h:2475 with -O2 -fno-tree-dse
-fno-tree-dce -mbig-endian -g
Product: gcc
Version: unknown
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: zsojka at seznam dot cz
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Target: aarch64-unknown-linux-gnu
Created attachment 63468
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63468&action=edit
reduced testcase
Compiler output:
$ aarch64-unknown-linux-gnu-gcc -O2 -fno-tree-dse -fno-tree-dce -mbig-endian -g
testcase.c
during RTL pass: early_ra
testcase.c: In function 'foo':
testcase.c:11:1: internal compiler error: in operator[], at vec.h:2475
11 | }
| ^
0x283eb9d internal_error(char const*, ...)
/repo/gcc-trunk/gcc/diagnostic-global-context.cc:787
0xc9b1cb fancy_abort(char const*, int, char const*)
/repo/gcc-trunk/gcc/diagnostics/context.cc:1812
0x9fc4cc operator[]
/repo/gcc-trunk/gcc/vec.h:2475
0x9fca0d operator[]
/repo/gcc-trunk/gcc/config/aarch64/aarch64-early-ra.cc:3234
0x9fca0d allocno
/repo/gcc-trunk/gcc/config/aarch64/aarch64-early-ra.cc:792
0x9fca0d replace_regs
/repo/gcc-trunk/gcc/config/aarch64/aarch64-early-ra.cc:3225
0x1a7b021 apply_allocation
/repo/gcc-trunk/gcc/config/aarch64/aarch64-early-ra.cc:3452
0x1a7b021 process_region
/repo/gcc-trunk/gcc/config/aarch64/aarch64-early-ra.cc:3527
0x1a7e00d process_block
/repo/gcc-trunk/gcc/config/aarch64/aarch64-early-ra.cc:3725
0x1a7f9bc process_blocks
/repo/gcc-trunk/gcc/config/aarch64/aarch64-early-ra.cc:3877
0x1a7f9bc execute
/repo/gcc-trunk/gcc/config/aarch64/aarch64-early-ra.cc:3902
0x1a7f9bc execute
/repo/gcc-trunk/gcc/config/aarch64/aarch64-early-ra.cc:3938
/repo/gcc-trunk/binary-trunk-20260123042236-r16-6987-gbb4fbc0b2d3aed-checking-yes-rtl-df-extra-aarch64/bin/../libexec/gcc/aarch64-unknown-linux-gnu/16.0.1/cc1
-quiet -iprefix
/repo/gcc-trunk/binary-trunk-20260123042236-r16-6987-gbb4fbc0b2d3aed-checking-yes-rtl-df-extra-aarch64/bin/../lib/gcc/aarch64-unknown-linux-gnu/16.0.1/
testcase.c -quiet -dumpdir a- -dumpbase testcase.c -dumpbase-ext .c
-mbig-endian -mabi=lp64 -g -O2 -fno-tree-dse -fno-tree-dce -o /tmp/ccLogOzh.s
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
$ aarch64-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-aarch64/bin/aarch64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-20260123042236-r16-6987-gbb4fbc0b2d3aed-checking-yes-rtl-df-extra-aarch64/bin/../libexec/gcc/aarch64-unknown-linux-gnu/16.0.1/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--enable-libsanitizer --with-sysroot=/usr/aarch64-unknown-linux-gnu
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=aarch64-unknown-linux-gnu
--with-ld=/usr/bin/aarch64-unknown-linux-gnu-ld
--with-as=/usr/bin/aarch64-unknown-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-20260123042236-r16-6987-gbb4fbc0b2d3aed-checking-yes-rtl-df-extra-aarch64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.1 20260123 (experimental) (GCC)