[Bug c/83703] Loop termination condition ignored in -O3, works in -O2 or with smaller values

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Jan 6 18:21:00 GMT 2018


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |jakub at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The compiler optimizes with the assumption that undefined behavior doesn't
happen (i.e. it compiles valid programs), so if you have UB in your code, all
bets are off, it can do anything.


More information about the Gcc-bugs mailing list