[flang-commits] [PATCH] D107120: [flang] Fix warnings as errors in ARM build of reduction unit tests.

Phabricator via flang-commits flang-commits at lists.llvm.org
Thu Jul 29 21:16:51 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGdfe9895a52cd: Fix scalar unit tests for all, any, maxloc, etc. that caused the ARM build (authored by Mark Leair <leairmark at gmail.com>).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107120

Files:
  flang/unittests/RuntimeGTest/Reduction.cpp


Index: flang/unittests/RuntimeGTest/Reduction.cpp
===================================================================
--- flang/unittests/RuntimeGTest/Reduction.cpp
+++ flang/unittests/RuntimeGTest/Reduction.cpp
@@ -150,8 +150,8 @@
   // A scalar result occurs when you have a rank 1 array and dim == 1.
   std::vector<int> shape1{24};
   auto array1{MakeArray<TypeCategory::Real, 8>(shape1, rawData)};
-  StaticDescriptor<0, true> statDesc0;
-  Descriptor &scalarResult{statDesc0.descriptor()};
+  StaticDescriptor<1, true> statDesc0[1];
+  Descriptor &scalarResult{statDesc0[0].descriptor()};
   RTNAME(MaxlocDim)
   (scalarResult, *array1, /*KIND=*/2, /*DIM=*/1, __FILE__, __LINE__,
       /*MASK=*/nullptr, /*BACK=*/false);
@@ -302,8 +302,8 @@
   std::vector<int> shape1{4};
   auto array1{MakeArray<TypeCategory::Logical, 4>(
       shape1, std::vector<std::int32_t>{false, false, true, true})};
-  StaticDescriptor<0, true> statDesc0;
-  Descriptor &scalarResult{statDesc0.descriptor()};
+  StaticDescriptor<1, true> statDesc0[1];
+  Descriptor &scalarResult{statDesc0[0].descriptor()};
   RTNAME(AllDim)(scalarResult, *array1, /*DIM=*/1, __FILE__, __LINE__);
   EXPECT_EQ(scalarResult.rank(), 0);
   EXPECT_EQ(*scalarResult.ZeroBasedIndexedElement<std::int32_t>(0), 0);
@@ -501,8 +501,8 @@
       std::vector<double>{0.0, -0.0, 1.0, 3.14,
           std::numeric_limits<double>::quiet_NaN(),
           std::numeric_limits<double>::infinity()})};
-  StaticDescriptor<0, true> statDesc0;
-  Descriptor &scalarResult{statDesc0.descriptor()};
+  StaticDescriptor<1, true> statDesc0[1];
+  Descriptor &scalarResult{statDesc0[0].descriptor()};
   RTNAME(FindlocDim)
   (scalarResult, *realArray1, target, 8, /*DIM=*/1, __FILE__, __LINE__, nullptr,
       /*BACK=*/false);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107120.362966.patch
Type: text/x-patch
Size: 1774 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210730/9780d659/attachment.bin>


More information about the flang-commits mailing list