[Bug c/64442] -O1 modify output of a simple computation with rounding
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 30 19:01:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64442
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu.org
--- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Colin Pitrat from comment #4)
> In the mean time I also discovered -Og that appeared in gcc 4.8, that
> provides optimization compatible with debugging and that have the same
> behavior. This allows me to have the same result with the release and the
> debug build, which is what was the issue for me.
That seems fragile to me, that is, likely to not work for different testcases
or compiler versions.
The "official" (non-wiki) FAQ for this is seriously lacking info, and it is
certainly a bug in many cases that GCC does not implement standard-mandated
behavior for excess precission. Fortunately, this is (or should be) fixed for
C. See https://gcc.gnu.org/wiki/FAQ#PR323 and the links therein.
> I'm still surprised by the fact that -Og or -O1 seems to be more than just
> the list of -f flags it activates, as providing only them doesn't trigger
> this same behaviour. I couldn't find another responsible flag in the
> difference I found in the output of --help=warnings,target,params,c or common
https://gcc.gnu.org/wiki/FAQ#optimization-options
More information about the Gcc-bugs
mailing list