https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117243
--- Comment #7 from Ye Xiong <bouncy12578 at gmail dot com> --- (In reply to Ye Xiong from comment #6) > (In reply to Sam James from comment #1) > > Trunk works. > > When param b is unsigned, trunk will crash. The original reduced file is: #include <stdint.h> void foo(uint32_t a, uint8_t b) { int i, j; lbl: for (b = 0; (b <= 7); b += 1) { uint8_t c[1][1]; int i, j, k; for (i = 0; i < 1; i++) { for (j = 0; j < 1; j++) { c[i][j] = 1; } } if (b) goto lbl; } } int main() { foo(1, 2); } this version will crash on -O3 or higher on trunk version, we reduced a bit more but seems the bug would eliminate on trunk version.