[Bug c/84121] optimizer breaks code without -frwapv, but -Wall -Wextra show no warnings

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jan 30 11:01:00 GMT 2018


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
It does:
itest.c:5:25: runtime error: signed integer overflow: 65536 * 65536 cannot be
represented in type 'int'
itest.c:5:14: runtime error: signed integer overflow: 1679617 * -239945 cannot
be represented in type 'int'
(this is without the #include <stdio.h> and __builtin_printf instead of printf,
but that should make no difference).
Get this both with trunk and -fsanitize=undefined -O3, -fsanitize=undefined
-O0,
and with 7.2.1 with the same option sets.


More information about the Gcc-bugs mailing list