[flang-commits] [PATCH] D128261: [Fortran] Relax relative tolerance for FCVS tests

Andrzej Warzynski via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Aug 12 06:18:12 PDT 2022


awarzynski added a comment.

Thanks for continuing to work on this! Just to clarify:

- Is this to land after https://reviews.llvm.org/D131754?
- Is this fix specifically for "gfortran" (i.e. required for "FM905.f" to pass when using "gfortran")?

it might be worth clarifying in the summary too.

This won't be true after https://reviews.llvm.org/D131754, right? (I mean the bit in bold)

> Since fpcmp treats everything as double precision, **it errors out in flang's case **because flang is printing the minimum number of decimals that would produce the same single precision value

Could you replace "this" with "the output from gfortran":

> Currently, the reference output contains the former, and the relative tolerance is low enough that **this** is being reported as an error.

Sorry for being picky, but this is quite fiddly and easy to get wrong.



================
Comment at: Fortran/UnitTests/fcvs21_f95/CMakeLists.txt:43
 set(FP_IGNOREWHITESPACE ON)
+set(FP_TOLERANCE 1.0e-7) # test 905
 llvm_singlesource()
----------------
awarzynski wrote:
> Could you add a comment saying that this is the relative tolerance? I think that this is key here.
I'd update this comment to clarify that this was introduced for "gfortran" specifically.


Repository:
  rT test-suite

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128261/new/

https://reviews.llvm.org/D128261



More information about the flang-commits mailing list