https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103219
Bug ID: 103219
Summary: [12 Regression] ICE Segmentation fault at -O3 (during
GIMPLE pass: unrolljam)
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi all.
I am not sure whether there is a dup but it appears to be a recent regression
issue.
$cat small.c
int a, b, c, e;
int d[10];
int main() {
if (c)
if (f()) {
g();
if (e) {
a = 0;
for (; a != 6; a = a + 2) {
b = 0;
for (; b <= 3; b++)
d[b] &= 1;
}
}
}
return 0;
}
$gcc -w -O3
during GIMPLE pass: unrolljam
small.c: In function ‘main’:
small.c:3:5: internal compiler error: Segmentation fault
3 | int main() {
| ^~~~
0xc290af crash_signal
../../gcc/toplev.c:322
0x17bfea7 tree_loop_unroll_and_jam
../../gcc/gimple-loop-jam.c:596
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.
$gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/media/haoxin/SeagateData/haoxin-data/dut-research/compilers/gcc/build/bin/../libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:../configure
--prefix=/home/haoxin/haoxin-data/dut-research/compilers/gcc/build/
--enable-bootstrap --enable-checking=release --enable-languages=c,c++
--enable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20211112 (experimental) (GCC)
Can also check here: https://godbolt.org/z/r7TKr8MxW
Thanks,
Haoxin