https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102303
Andrew Pinski changed:
What|Removed |Added
Resolution|--- |DUPLICATE
Status|UNCONFIRME
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102303
--- Comment #2 from Richard Biener ---
No, the issue is that we apply constant folding and elide the trapping
operation which is generally considered OK by GCC (eliding traps, that is).
For example
we also elide the trap in
int main()
{
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102303
--- Comment #1 from Andrew Pinski ---
This is a known bug with -ftrapv where gcc widens everything to word mode
(64bit in this case) and uses libcalls to implement-ftrapv. There are a few
other bugs that say the same thing.