https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123754
Bug ID: 123754
Summary: [16 Regression] ICE: in store_integral_bit_field, at
expmed.cc:1069 with -O2 -favoid-store-forwarding
-mbig-endian
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 63450
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63450&action=edit
reduced testcase
Compiler output:
$ aarch64-unknown-linux-gnu-gcc -O2 -favoid-store-forwarding -mbig-endian
testcase.c
during RTL pass: avoid_store_forwarding
testcase.c: In function 'foo':
testcase.c:10:1: internal compiler error: in store_integral_bit_field, at
expmed.cc:1069
10 | }
| ^
0x283e5dd internal_error(char const*, ...)
/repo/gcc-trunk/gcc/diagnostic-global-context.cc:787
0xc9b16f fancy_abort(char const*, int, char const*)
/repo/gcc-trunk/gcc/diagnostics/context.cc:1812
0x86527f store_integral_bit_field
/repo/gcc-trunk/gcc/expmed.cc:1069
0x86527f store_bit_field_1
/repo/gcc-trunk/gcc/expmed.cc:891
0xfc1ec6 store_bit_field(rtx_def*, poly_int<2u, unsigned long>, poly_int<2u,
unsigned long>, poly_int<2u, unsigned long>, poly_int<2u, unsigned long>,
machine_mode, rtx_def*, bool, bool)
/repo/gcc-trunk/gcc/expmed.cc:1213
0x14c408d generate_bit_insert_sequence
/repo/gcc-trunk/gcc/avoid-store-forwarding.cc:123
0x14c408d process_store_forwarding
/repo/gcc-trunk/gcc/avoid-store-forwarding.cc:294
0x14c408d avoid_store_forwarding
/repo/gcc-trunk/gcc/avoid-store-forwarding.cc:680
0x14c53d0 execute
/repo/gcc-trunk/gcc/avoid-store-forwarding.cc:732
/repo/gcc-trunk/binary-trunk-20260121115033-r16-6953-g89f58d2df5cf12-checking-yes-rtl-df-extra-aarch64/bin/../libexec/gcc/aarch64-unknown-linux-gnu/16.0.1/cc1
-quiet -iprefix
/repo/gcc-trunk/binary-trunk-20260121115033-r16-6953-g89f58d2df5cf12-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 -O2 -favoid-store-forwarding -o /tmp/cchUuXZN.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-20260121115033-r16-6953-g89f58d2df5cf12-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-20260121115033-r16-6953-g89f58d2df5cf12-checking-yes-rtl-df-extra-aarch64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.0.1 20260121 (experimental) (GCC)