[flang-commits] [PATCH] D107107: [flang] Fix all/any scalar unit tests

Mark LeAir via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu Jul 29 14:34:43 PDT 2021


mleair created this revision.
mleair added a project: Flang.
Herald added a subscriber: jdoerfert.
mleair requested review of this revision.

I accidentally used int64 instead of int32 in the unit test result check of all/any unit tests. This lead to bad results in the Windows build.


https://reviews.llvm.org/D107107

Files:
  flang/unittests/RuntimeGTest/Reduction.cpp


Index: flang/unittests/RuntimeGTest/Reduction.cpp
===================================================================
--- flang/unittests/RuntimeGTest/Reduction.cpp
+++ flang/unittests/RuntimeGTest/Reduction.cpp
@@ -306,7 +306,7 @@
   Descriptor &scalarResult{statDesc0.descriptor()};
   RTNAME(AllDim)(scalarResult, *array1, /*DIM=*/1, __FILE__, __LINE__);
   EXPECT_EQ(scalarResult.rank(), 0);
-  EXPECT_EQ(*scalarResult.ZeroBasedIndexedElement<std::int64_t>(0), 0);
+  EXPECT_EQ(*scalarResult.ZeroBasedIndexedElement<std::int32_t>(0), 0);
   scalarResult.Destroy();
   RTNAME(AnyDim)(res, *array, /*DIM=*/1, __FILE__, __LINE__);
   EXPECT_EQ(res.rank(), 1);
@@ -328,7 +328,7 @@
   // A scalar result occurs when you have a rank 1 array.
   RTNAME(AnyDim)(scalarResult, *array1, /*DIM=*/1, __FILE__, __LINE__);
   EXPECT_EQ(scalarResult.rank(), 0);
-  EXPECT_EQ(*scalarResult.ZeroBasedIndexedElement<std::int64_t>(0), 1);
+  EXPECT_EQ(*scalarResult.ZeroBasedIndexedElement<std::int32_t>(0), 1);
   scalarResult.Destroy();
   RTNAME(ParityDim)(res, *array, /*DIM=*/1, __FILE__, __LINE__);
   EXPECT_EQ(res.rank(), 1);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107107.362885.patch
Type: text/x-patch
Size: 1119 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210729/8a7f2e01/attachment.bin>


More information about the flang-commits mailing list