diff --git a/flang/unittests/RuntimeGTest/Reduction.cpp b/flang/unittests/RuntimeGTest/Reduction.cpp index d5dc54160c44..e709b0c8f9ed 100644 --- a/flang/unittests/RuntimeGTest/Reduction.cpp +++ b/flang/unittests/RuntimeGTest/Reduction.cpp @@ -150,8 +150,8 @@ TEST(Reductions, DoubleMaxMinNorm2) { // A scalar result occurs when you have a rank 1 array and dim == 1. std::vector shape1{24}; auto array1{MakeArray(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 @@ TEST(Reductions, Logical) { std::vector shape1{4}; auto array1{MakeArray( shape1, std::vector{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(0), 0); @@ -501,8 +501,8 @@ TEST(Reductions, FindlocNumeric) { std::vector{0.0, -0.0, 1.0, 3.14, std::numeric_limits::quiet_NaN(), std::numeric_limits::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);