[Bug c++/122304] UB MArch x86_64 v3/4 rounding Errors

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Oct 17 05:48:26 GMT 2025


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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Sam James from comment #2)
> Please try -ffp-contract=off or -ffp-contract=standard.

-ffp-contract=standard is NOT an option, it is -ffp-contract=on.

Yes it is a bit confusing that way. off means no contraction will happen. while
on means only contraction allowed by the standard (inside expressions only and
not outside of statements) unless one of the #pragma is in turned on. While
fast means across all statements.

It might also be the case that =on might fail too because the code is expecting
no contraction (that is no use of Fused multiply add instructions).


More information about the Gcc-bugs mailing list