[flang-commits] [flang] 2734162 - [flang] Disable some new unit tests (non-portable results)

peter klausler via flang-commits flang-commits at lists.llvm.org
Thu Apr 1 17:04:01 PDT 2021


Author: peter klausler
Date: 2021-04-01T17:03:54-07:00
New Revision: 273416231b1477503cd5281ef2587c40efae2747

URL: https://github.com/llvm/llvm-project/commit/273416231b1477503cd5281ef2587c40efae2747
DIFF: https://github.com/llvm/llvm-project/commit/273416231b1477503cd5281ef2587c40efae2747.diff

LOG: [flang] Disable some new unit tests (non-portable results)

Due to architectural variation on the C++ functions std::ceil, std::floor,
and std::trunc, diable some new Fortran unit tests for now that depending
on specifical results for IEEE floating-point edge cases of infinities
and NaNs.

Added: 
    

Modified: 
    flang/unittests/RuntimeGTest/Numeric.cpp

Removed: 
    


################################################################################
diff  --git a/flang/unittests/RuntimeGTest/Numeric.cpp b/flang/unittests/RuntimeGTest/Numeric.cpp
index b8d8a993f8bf..b930b0a708de 100644
--- a/flang/unittests/RuntimeGTest/Numeric.cpp
+++ b/flang/unittests/RuntimeGTest/Numeric.cpp
@@ -44,20 +44,12 @@ TEST(Numeric, Ceiling) {
   EXPECT_EQ(RTNAME(Ceiling4_4)(Real<4>{3.7}), 4);
   EXPECT_EQ(RTNAME(Ceiling8_8)(Real<8>{-3.7}), -3);
   EXPECT_EQ(RTNAME(Ceiling4_1)(Real<4>{0}), 0);
-  EXPECT_EQ(RTNAME(Ceiling4_4)(std::numeric_limits<Real<4>>::infinity()),
-      std::numeric_limits<Int<4>>::min());
-  EXPECT_EQ(RTNAME(Ceiling4_4)(std::numeric_limits<Real<4>>::quiet_NaN()),
-      std::numeric_limits<Int<4>>::min());
 }
 
 TEST(Numeric, Floor) {
   EXPECT_EQ(RTNAME(Floor4_4)(Real<4>{3.7}), 3);
   EXPECT_EQ(RTNAME(Floor8_8)(Real<8>{-3.7}), -4);
   EXPECT_EQ(RTNAME(Floor4_1)(Real<4>{0}), 0);
-  EXPECT_EQ(RTNAME(Floor4_4)(std::numeric_limits<Real<4>>::infinity()),
-      std::numeric_limits<Int<4>>::min());
-  EXPECT_EQ(RTNAME(Floor4_4)(std::numeric_limits<Real<4>>::quiet_NaN()),
-      std::numeric_limits<Int<4>>::min());
 }
 
 TEST(Numeric, Exponent) {
@@ -118,12 +110,6 @@ TEST(Numeric, Nint) {
   EXPECT_EQ(RTNAME(Nint4_4)(Real<4>{2.5}), 3);
   EXPECT_EQ(RTNAME(Nint8_4)(Real<8>{-2.5}), -3);
   EXPECT_EQ(RTNAME(Nint8_8)(Real<8>{0}), 0);
-  auto nintInf{RTNAME(Nint4_4)(std::numeric_limits<Real<4>>::infinity())};
-  EXPECT_TRUE(nintInf == std::numeric_limits<Int<4>>::min() ||
-      nintInf == std::numeric_limits<Int<4>>::max());
-  auto nintNaN{RTNAME(Nint4_4)(std::numeric_limits<Real<4>>::quiet_NaN())};
-  EXPECT_TRUE(nintNaN == std::numeric_limits<Int<4>>::min() ||
-      nintNaN == std::numeric_limits<Int<4>>::max());
 }
 
 TEST(Numeric, RRSpacing) {


        


More information about the flang-commits mailing list