https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126447
Bug ID: 126447
Summary: [17 Regression] ICE SSA corruption, bitint + signed
overflow sanitizer, since r17-2439
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: mjires at gcc dot gnu.org
CC: jakub at redhat dot com
Target Milestone: ---
Compiling reduced testcase gcc.dg/bitint-100.c results in ICE since
r17-2439-gb032f71e16603f.
$ cat bitint-100.c
void foo(int);
__attribute__((returns_twice)) void garply();
void plugh() {
_BitInt(575) w;
garply();
w *= 3;
foo(3);
}
$ gcc bitint-100.c -fsanitize=signed-integer-overflow
Unable to coalesce ssa_names 2 and 8 which are marked as MUST COALESCE.
w_2(ab) and w_8(ab)
during GIMPLE pass: bitintlower0
bitint-100.c: In function ‘plugh’:
bitint-100.c:3:6: internal compiler error: SSA corruption
3 | void plugh() {
| ^~~~~
0x27b9a01 internal_error(char const*, ...)
/home/mjires/git/GCC/master/gcc/diagnostic-global-context.cc:787
0x1225f4b fail_abnormal_edge_coalesce
/home/mjires/git/GCC/master/gcc/tree-ssa-coalesce.cc:1014
0x1225f4b coalesce_partitions
/home/mjires/git/GCC/master/gcc/tree-ssa-coalesce.cc:1446
0x1225f4b coalesce_ssa_name(_var_map*)
/home/mjires/git/GCC/master/gcc/tree-ssa-coalesce.cc:1900
0x23a509a gimple_lower_bitint
/home/mjires/git/GCC/master/gcc/gimple-lower-bitint.cc:8036
0x23a87f4 execute
/home/mjires/git/GCC/master/gcc/gimple-lower-bitint.cc:8684
/home/mjires/built/master/libexec/gcc/x86_64-pc-linux-gnu/17.0.0/cc1 -quiet
bitint-100.c -quiet -dumpdir a- -dumpbase bitint-100.c -dumpbase-ext .c
-mtune=generic -march=x86-64 -fsanitize=signed-integer-overflow -o
/tmp/ccyEw6oC.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.
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/mjires/built/master/libexec/gcc/x86_64-pc-linux-gnu/17.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --disable-bootstrap
--enable-languages=c,c++,fortran,lto --disable-multilib --disable-libsanitizer
--enable-checking : (reconfigured) /home/mjires/git/GCC/master/configure
--prefix=/home/mjires/built/master --disable-bootstrap --disable-multilib
--disable-libsanitizer --enable-checking --enable-languages=c,c++,fortran,lto
--no-create --no-recursion
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 17.0.0 20260728 (experimental) (GCC)