https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83779
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |msebor at gcc dot gnu.org --- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> --- Not sure if that will help you but with -O1 and above, the test case triggers a -Waggressive-loop-optimizations warning: warning: iteration 20 invokes undefined behavior [-Waggressive-loop-optimizations] array1[i] = i; ~~~~~~~~~~^~~ z.c:7:3: note: within this loop for (int i=0; i<25; i++) ^~~