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

Diana Picus via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Jul 1 02:01:00 PDT 2022


rovka updated this revision to Diff 441633.
rovka added a comment.

Right, sorry, I don't know why the other change disappeared. It should be back now.
Regarding the other tests, AFAICT they don't use list-directed or NAMELIST output, so having stricter checks might (?) actually catch real problems. But really I don't know much about the subtleties of Fortran FP formats. @klausler Should we update the tolerance for all tests now or wait and treat each issue we might run into separately?


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

https://reviews.llvm.org/D128261

Files:
  Fortran/UnitTests/fcvs21_f95/CMakeLists.txt
  Fortran/UnitTests/fcvs21_f95/FM905.reference_output


Index: Fortran/UnitTests/fcvs21_f95/FM905.reference_output
===================================================================
--- Fortran/UnitTests/fcvs21_f95/FM905.reference_output
+++ Fortran/UnitTests/fcvs21_f95/FM905.reference_output
@@ -42,7 +42,7 @@
        2.5
      4    INSPECT
                  COMPUTED= 
-   2.50000003E-11  0.250000000       250.000000       2.50000000E+09
+   2.5E-11  0.250000000       250.000000       2.50000000E+09
                  CORRECT=  
         2.5E-11  0.25  250.0   2.5E+09
      5    INSPECT
Index: Fortran/UnitTests/fcvs21_f95/CMakeLists.txt
===================================================================
--- Fortran/UnitTests/fcvs21_f95/CMakeLists.txt
+++ Fortran/UnitTests/fcvs21_f95/CMakeLists.txt
@@ -40,6 +40,7 @@
 set(SPECIAL_CASES "FM905.f" "FM907.f")
 set(Source ${SPECIAL_CASES})
 set(FP_IGNOREWHITESPACE ON)
+set(FP_TOLERANCE 1.0e-7) # FM905 needs a higher relative tolerance than the rest
 llvm_singlesource()
 set(Source)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128261.441633.patch
Type: text/x-patch
Size: 988 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220701/c739cc76/attachment.bin>


More information about the flang-commits mailing list