[Bug middle-end/79818] [7 Regression] wrong code with -fwrapv and -Os/-O1/-O2/-O3
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 2 13:27:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79818
--- Comment #5 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #2)
> - (if (TREE_OVERFLOW (res))
> + (if (TREE_OVERFLOW (res)
> + && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (@0)))
I don't remember why I wrote it that way, maybe I didn't expect TREE_OVERFLOW
to be set with -fwrapv... (that would still have been wrong for
-fno-strict-overflow)
Your patch seems right, thanks.
More information about the Gcc-bugs
mailing list