[Bug middle-end/56932] [regression 4.8]: vrp and/or niter-related wrong-code bug

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Apr 12 11:28:00 GMT 2013


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.



More information about the Gcc-bugs mailing list