https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95025
--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> --- $ cat pr95025.c static int a; short b; int *c; void d() { for (;; a -= 1) for (; b; b += 1) { *c ^= 5; if (a) return; } } $ gcc -O2 -c pr95025.c -Werror during GIMPLE pass: lim pr95025.c: In function ‘d’: pr95025.c:4:6: internal compiler error: Segmentation fault 4 | void d() { | ^ 0xe36b0f crash_signal /home/marxin/Programming/gcc/gcc/toplev.c:328 0x7ffff78fef1f ??? /usr/src/debug/glibc-2.31-4.1.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 0x72dd2c execute_sm_exit /home/marxin/Programming/gcc/gcc/tree-ssa-loop-im.c:2224 0xf71d25 hoist_memory_references /home/marxin/Programming/gcc/gcc/tree-ssa-loop-im.c:2562 0xf71d25 store_motion_loop /home/marxin/Programming/gcc/gcc/tree-ssa-loop-im.c:2824 0xf70a21 store_motion_loop /home/marxin/Programming/gcc/gcc/tree-ssa-loop-im.c:2830 0xf72cca store_motion /home/marxin/Programming/gcc/gcc/tree-ssa-loop-im.c:2845 0xf72cca tree_ssa_lim /home/marxin/Programming/gcc/gcc/tree-ssa-loop-im.c:3065 0xf72cca execute /home/marxin/Programming/gcc/gcc/tree-ssa-loop-im.c:3115 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.