https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125238
Bug ID: 125238
Summary: ICE on valid code at -O3 on x86_64-linux-gnu:
Segmentation fault
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: zhendong.su at inf dot ethz.ch
Target Milestone: ---
Note:
- fails: trunk
- works: 16.1 and earlier
- very recent as the Compiler Explorer build doesn't ICE
[589] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/home/suz/suz-local/software/local/gcc-trunk/bin/../libexec/gcc/x86_64-pc-linux-gnu/17.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--enable-checking=yes --prefix=/local/suz-local/software/local/gcc-trunk
--enable-sanitizers --enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 17.0.0 20260508 (experimental) (GCC)
[590] %
[590] % gcctk -O3 small.c
during RTL pass: x86_cse
small.c: In function ‘main’:
small.c:20:1: internal compiler error: Segmentation fault
20 | }
| ^
0x2629c0b internal_error(char const*, ...)
../../gcc-trunk/gcc/diagnostic-global-context.cc:787
0x11f0333 crash_signal
../../gcc-trunk/gcc/toplev.cc:325
0x7fb7d7dc051f ???
./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x1777621 ix86_place_single_vector_set
../../gcc-trunk/gcc/config/i386/i386-features.cc:3342
0x1779ec6 x86_cse
../../gcc-trunk/gcc/config/i386/i386-features.cc:5074
/local/home/suz/suz-local/software/local/gcc-trunk/bin/../libexec/gcc/x86_64-pc-linux-gnu/17.0.0/cc1
-quiet -I /usr/local/include -I /local/suz-local/software/local/include
-imultiarch x86_64-linux-gnu -iprefix
/local/home/suz/suz-local/software/local/gcc-trunk/bin/../lib/gcc/x86_64-pc-linux-gnu/17.0.0/
small.c -quiet -dumpdir a- -dumpbase small.c -dumpbase-ext .c -mtune=generic
-march=x86-64 -O3 -o /tmp/ccS5K1EA.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.
[591] %
[591] % cat small.c
int printf(const char *, ...);
char a, b, d, e, k;
int c, f, g, h, i, j;
int main() {
while (a) {
int *n = &h, *o = &g;
printf("%d", f);
for (; c; c++) {
int *p = &j;
for (b = 0; b < 8; b++) {
e = a > 0 ? a : a << 1;
k = -e;
*n &= (k != *p);
}
for (; d; d++)
i || (*o = *p = 2);
}
}
return 0;
}