Now that ⚙ D136080 [flang] Add -ffp-contract option processing has landed, we have an -ffp-contract
flag in Flang. The flag doesn’t do anything yet, but will eventually control whether the contract
attribute is added to LLVM IR for floating point operations.
Currently the default value is off
, meaning that the attribute will not be added. However, gfortran defaults to “fast” (see Optimize Options (Using the GNU Compiler Collection (GCC))).
Should the default be changed to “fast” to match gfortran?
Similar discussion for clang is here: FP contraction (FMA) on by default