[Bug c/85957] i686: Integers appear to be different, but compare as equal

vincent-gcc at vinc17 dot net gcc-bugzilla@gcc.gnu.org
Sun Feb 9 02:05:00 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85957

--- Comment #13 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> ---
(In reply to Rich Felker from comment #12)
> [...] and making the floating point results even more semantically incorrect
> (double-rounding all over the place, mismatching FLT_EVAL_METHOD==2)

No problems: FLT_EVAL_METHOD==2 means "evaluate all operations and constants to
the range and precision of the long double type", which is what really occurs.
The consequence is indeed double rounding when storing in memory, but this can
happen at *any* time even without -ffloat-store (due to spilling), because you
are never sure that registers are still available; see some reports in bug 323.

Double rounding can be a problem with some codes, but this just means that the
code is not compatible with FLT_EVAL_METHOD==2. For some floating-point
algorithms, double rounding is not a problem at all, while keeping a result in
extended precision will make them fail.


More information about the Gcc-bugs mailing list