[Bug c/53857] Possible problem with arithmetic overflow in optimizer

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jul 4 18:03:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53857

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> 2012-07-04 18:03:26 UTC ---
>some_arithmetic_operations_on_signed_integers_with_overflow

Once overflow happens the result is undefined.

>What is suspicious compilation behaves in very unpredictable way.

No it is not, according to the rules of C. As once an undefined behavior has
happen, anything goes aftwards



More information about the Gcc-bugs mailing list