http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56932
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2013-04-12 11:28:02 UTC --- a[i] causes undefined behavior as there is an access above the array bounds. If I change the loop to be: for (i=0;i<250;i++) Or for (i=0;i<1024;i++) and increase the size of a to 1024. The code works correctly.