https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101202
Bug ID: 101202
Summary: ICE at -O3 on x86_64-linux-gnu: Segmentation fault
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: zhendong.su at inf dot ethz.ch
Target Milestone: ---
This seems to be a very recent regression.
[529] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--prefix=/local/suz-local/software/local/gcc-trunk --enable-languages=c,c++
--disable-werror --enable-multilib --with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210624 (experimental) [master revision
a0accaa9984:cc7f2982315:ce3316e9c02c81c509173572c71a101f4eb62a24] (GCC)
[530] %
[530] % gcctk -O2 small.c; ./a.out
[531] %
[531] % gcctk -O3 small.c
during GIMPLE pass: slp
small.c: In function ‘main’:
small.c:4:5: internal compiler error: Segmentation fault
4 | int main() {
| ^~~~
0xdb35cf crash_signal
../../gcc-trunk/gcc/toplev.c:327
0x10cf440 vect_optimize_slp(vec_info*)
../../gcc-trunk/gcc/tree-vect-slp.c:3694
0x10d7d77 vect_optimize_slp(vec_info*)
../../gcc-trunk/gcc/vec.h:1448
0x10d7d77 vect_slp_analyze_bb_1
../../gcc-trunk/gcc/tree-vect-slp.c:5608
0x10d7d77 vect_slp_region
../../gcc-trunk/gcc/tree-vect-slp.c:5695
0x10d9a0a vect_slp_bbs
../../gcc-trunk/gcc/tree-vect-slp.c:5845
0x10d9f4c vect_slp_function(function*)
../../gcc-trunk/gcc/tree-vect-slp.c:5931
0x10e12a6 execute
../../gcc-trunk/gcc/tree-vectorizer.c:1445
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
[532] %
[532] % cat small.c
int printf(const char *, ...);
unsigned a, b, d;
int c, e, f;
int main() {
while (a)
if (b) {
f = a;
while (e) {
int h, i;
if (d) {
h = a;
i = d;
L:
d = a | d && c;
if (a) {
printf("%d", a);
goto L;
}
}
a = h;
d = i;
}
}
return 0;
}