https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84996
--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- Adding +0.0 and -0.0 produces +0.0 except in FE_DOWNWARD mode. I.e., optimizing away an addition of +0.0 requires -fno-signed-zeros (not the default), as well as -fno-signaling-nans (which is the default). And if you pass -fno-signed-zeros, this code (the first test in this bug) is *already* optimized. It's true that if you add +0.0 to a value that cannot be -0.0 or a signaling NaN - such as a value resulting from a conversion from integer type - then it's a no-op regardless of compilation options. So the second test could be better optimized.