https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106114
--- Comment #6 from Zhendong Su <zhendong.su at inf dot ethz.ch> --- Two additional recent miscompiles that are likedly related: (1) [638] % gcctk -O0 small.c; ./a.out [639] % gcctk -O1 small.c [640] % ./a.out Aborted [641] % cat small.c int a, b; int main() { int c = 0, d, e, f; for (e = 0; e < 3; e++) { f = a; if (!b) f = 1; d = f; } if (d > 1 || d <= c) __builtin_abort(); return 0; } (2) [579] % gcctk -O1 small.c; ./a.out [580] % gcctk -O2 small.c [581] % timeout -s 9 5 ./a.out Killed [582] % cat small.c int a, b, *c; int f(int d, int e) { return !e || d && e == 1 ? 0 : d % e; } int main() { int g = -4, h = -3; if (a) h = b; while (h <= g || h > -1) ; if (f(1, a) > 3) c = &h; return 0; }