This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug sanitizer/82072] sanitizer does not detect an overflow from LLONG_MIN


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

--- Comment #9 from Vittorio Zecca <zeccav at gmail dot com> ---
Applying the proposed fix and compiling the test case with
-fsanitize=undefined I get

testcase.c:8:3: runtime error: signed integer overflow: 0 -
-9223372036854775808 cannot be represented in type 'long int'
testcase.c:9:5: runtime error: negation of -9223372036854775808 cannot
be represented in type 'long int'; cast to an unsigned type to negate
this value to itself

as it should be.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]