https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82004
--- Comment #4 from Andrey Guskov <andrey.y.guskov at intel dot com> --- Okay, finally I`ve got a minimal reproducer. All this miscompare boils down to the following: program r628 real(8) :: l = -3 print *, merge("PASSED", "FAILED", 1D-3 .le. 10**l) end program r628 Normally, 10^-3 should equal 10^-3, but not after the optimization in question. $ gfortran -m64 -O3 -o r628 r628.f90 && ./r628 PASSED $ gfortran -m64 -Ofast -o r628 r628.f90 && ./r628 FAILED