https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102645
Bug ID: 102645 Summary: ICE on valid code 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: --- [618] % 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 20211007 (experimental) [master r12-4238-gfba228e259d] (GCC) [619] % [619] % gcctk -O2 small.c; ./a.out [620] % [620] % gcctk -O3 small.c during GIMPLE pass: unrolljam small.c: In function ‘main’: small.c:3:5: internal compiler error: Segmentation fault 3 | int main() { | ^~~~ 0xe78d7f crash_signal ../../gcc-trunk/gcc/toplev.c:326 0x1027191 tree_transform_and_unroll_loop(loop*, unsigned int, edge_def*, tree_niter_desc*, void (*)(loop*, void*), void*) ../../gcc-trunk/gcc/tree-ssa-loop-manip.c:1424 0x1a97e6b tree_loop_unroll_and_jam ../../gcc-trunk/gcc/gimple-loop-jam.c:590 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. [621] % [621] % cat small.c volatile int a[1], d; int b, c; int main() { if (b && c) { for (c = 0; c < 3; c++) { for (int e = 0; e < 6; e++) for (int f = 0; f < 12; f++) d && a[0]; continue; } } return 0; }