https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100810
--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> --- Testcase from PR102902, since it runtime times-out difficult to adapt to the testsuite bug fixed by both proposed patches. [576] % gcctk -O2 small.c; ./a.out [577] % [577] % gcctk -O3 small.c [578] % timeout -s 9 10 ./a.out Killed [579] % [579] % cat small.c int printf (const char *, ...); int a, b, c, d, e, f; int main() { int g; short h = 1; for (; e < 2; e++) { L1: f = 1; while (b > 0 || a > 0) { g++; h++; printf("%d", g); } L2: if (!h && (!c || a)) goto L1; if (c) goto L2; } return 0; }