[Bug c/64185] Optimized code gives unexpected results
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Dec 8 07:52:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64185
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> ---
-fsanitize=undefined says
q.c:71:22: runtime error: index 1 out of bounds for type 'kv_t [1]'
q.c:73:20: runtime error: index 3 out of bounds for type 'kv_t [1]'
An out-of-bounds access is not just something that "looks not clean", it is a
bug, you're triggering undefined behavior so all bets are off. Invalid.
More information about the Gcc-bugs
mailing list