[Bug c++/97641] Wrong codegen if optimizer is enabled

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Oct 30 15:55:10 GMT 2020


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

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

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Your testcase is invalid, 2147483648 can't be represented in signed int, so
there is signed integer overflow when adding the 8 to 2147483640 and then (if
the result happens to be -2147483648) again when negating it in -result.


More information about the Gcc-bugs mailing list