https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124078
Bug ID: 124078
Summary: [16 Regression] ICE: in gen_rtx_SUBREG, at
emit-rtl.cc:1048 with -O1 -mbig-endian and vector
division
Product: gcc
Version: 16.0
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 63653
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63653&action=edit
reduced testcase
Compiler output:
$ aarch64-unknown-linux-gnu-gcc -O1 -mbig-endian testcase.c
during RTL pass: reload
testcase.c: In function 'foo':
testcase.c:2:22: internal compiler error: in gen_rtx_SUBREG, at
emit-rtl.cc:1048
2 | void foo() { v /= 3; }
| ^
0x283e62d internal_error(char const*, ...)
/repo/gcc-trunk/gcc/diagnostic-global-context.cc:787
0xc9b603 fancy_abort(char const*, int, char const*)
/repo/gcc-trunk/gcc/diagnostics/context.cc:1812
0x85bb46 gen_rtx_SUBREG(machine_mode, rtx_def*, poly_int<2u, unsigned long>)
/repo/gcc-trunk/gcc/emit-rtl.cc:1048
0x85bb46 gen_rtx_SUBREG(machine_mode, rtx_def*, poly_int<2u, unsigned long>)
/repo/gcc-trunk/gcc/emit-rtl.cc:1046
0x129057a match_reload
/repo/gcc-trunk/gcc/lra-constraints.cc:1168
0x12a06c0 curr_insn_transform
/repo/gcc-trunk/gcc/lra-constraints.cc:4979
0x12a31c7 lra_constraints(bool)
/repo/gcc-trunk/gcc/lra-constraints.cc:5729
0x1284c34 lra(_IO_FILE*, int)
/repo/gcc-trunk/gcc/lra.cc:2464
0x122d6af do_reload
/repo/gcc-trunk/gcc/ira.cc:6076
0x122d6af execute
/repo/gcc-trunk/gcc/ira.cc:6264
/repo/gcc-trunk/binary-trunk-20260212070934-r16-7473-gca3cdf95748238-checking-yes-rtl-df-extra-aarch64/bin/../libexec/gcc/aarch64-unknown-linux-gnu/16.0.1/cc1
-quiet -iprefix
/repo/gcc-trunk/binary-trunk-20260212070934-r16-7473-gca3cdf95748238-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 -O1 -o /tmp/ccjoRbL7.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-20260212070934-r16-7473-gca3cdf95748238-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-20260212070934-r16-7473-gca3cdf95748238-checking-yes-rtl-df-extra-aarch64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.1 20260212 (experimental) (GCC)