[Bug c/123482] in -frounding-math, GCC moves floating-point operation across fesetround call
pascal_cuoq at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Jan 8 15:33:43 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123482
--- Comment #4 from Pascal Cuoq <pascal_cuoq at hotmail dot com> ---
@Vincent Lefèvre
Since the rounding mode is set by calling a function, technically, the same
rounding mode can only be in effect everywhere in a program that doesn't call
fesetround or only calls it with FE_TONEAREST.
I understand -frounding-math is partially implemented, but the description of
how it is implemented is not useful if it amounts to “GCC will put ‘false’ in
the hypotheses of the optimizer if the program calls fesetround with an
argument other than FE_TONEAREST”.
More information about the Gcc-bugs
mailing list