[Bug sanitizer/64996] UBsan check optimized out by -O
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 10 09:50:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64996
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |mpolacek at gcc dot gnu.org
Resolution|--- |INVALID
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Since the variable is unused, we get rid of it, and then DCE removes the ubsan
check. I don't think it is a bug. Adding asm ("" : "+g" (i)); after the
decrement makes the runtime error appear again.
More information about the Gcc-bugs
mailing list