https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114624
Bug ID: 114624 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: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: zhendong.su at inf dot ethz.ch Target Milestone: --- This appears to be a recent regression. Compiler Explorer: https://godbolt.org/z/neef45W14 [516] % 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/14.0.1/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 14.0.1 20240405 (experimental) (GCC) [517] % [517] % gcctk -O3 small.c during GIMPLE pass: sccp small.c: In function ‘main’: small.c:2:5: internal compiler error: Segmentation fault 2 | int main() { | ^~~~ 0x116b653 crash_signal ../../gcc-trunk/gcc/toplev.cc:319 0x7fe51d50a08f ??? /build/glibc-wuryBv/glibc-2.31/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 0x249ec06 get_data_from_adhoc_loc(line_maps const*, unsigned int) ../../gcc-trunk/libcpp/line-map.cc:297 0x11b8216 verify_location ../../gcc-trunk/gcc/tree-cfg.cc:5384 0x11bc50f verify_gimple_in_cfg(function*, bool, bool) ../../gcc-trunk/gcc/tree-cfg.cc:5600 0x10292b4 execute_function_todo ../../gcc-trunk/gcc/passes.cc:2089 0x1029c0e execute_todo ../../gcc-trunk/gcc/passes.cc:2143 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. [518] % [518] % cat small.c int a, b; int main() { int c, d = 1; while (a) { while (b) if (d) while (a) ; for (; b < 2; b++) if (b) for (c = 0; c < 8; c++) d = 0; else for (a = 0; a < 2; a++) ; } return 0; }