[Bug middle-end/67662] -fsanitize=undefined cries wolf for X - 1 + X when X is 2**30
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Sep 21 06:29:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67662
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-09-21
Component|sanitizer |middle-end
Ever confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is a reassociation issue inside fold-const. Basically we change x - 1 + x
to x + x - 1 which is invalid as it introduces an overflow which was not there
before. (This is why we need an addition tree where overflow is defined).
More information about the Gcc-bugs
mailing list