[Bug tree-optimization/89329] "-O2" optimization causes a infinite loop

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Feb 13 09:14:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89329

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
          Component|c                           |tree-optimization
         Resolution|---                         |INVALID

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
> If the value of 'i' is over ARR_MAX before the second loop, there is no
> condition to exit the loop.

Yes because i cannot be over ARR_MAX as that would have involved undefined
behavior while accessing pStruct->array2.


More information about the Gcc-bugs mailing list