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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

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

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
From https://gcc.gnu.org/bugs/:
»if compiling with -fno-strict-aliasing -fwrapv
-fno-aggressive-loop-optimizations makes a difference, your code probably is
not correct.«

markus@x4 tmp % gcc -fsanitize=undefined -Wall -Wextra -O2 main.i
markus@x4 tmp % ./a.out
I = 0, Result = 0
I = 1, Result = 1234567890
main.c:12:11: runtime error: signed integer overflow: 2 * 1234567890 cannot be
represented in type 'int'

Reply via email to