https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103300
--- Comment #6 from Zhendong Su <zhendong.su at inf dot ethz.ch> ---
Another test likely for the same issue:
[652] % gcctk -O3 small.c; ./a.out
Aborted
[653] % gcctk -O2 -floop-unroll-and-jam small.c; ./a.out
Aborted
[654] % cat small.c
int printf(const char *, ...);
int a[2], b, c, d, e;
int main() {
if (b) {
printf("0");
goto L2;
}
L1:
b = 0;
L2:
if (d)
L3:
goto L1;
if (e)
goto L3;
if (c)
goto L2;
for (b = 0; b < 3; b++)
for (d = 0; d < 2; d++)
a[d] ^= 1;
if (a[1] != 1)
__builtin_abort();
return 0;
}