[flang-commits] [flang] dd047c5 - [Flang] remove setting lowerbound for non existing dimension in shift runtime test case (NFC) (#76990)

via flang-commits flang-commits at lists.llvm.org
Thu Jan 4 13:23:06 PST 2024


Author: madanial0
Date: 2024-01-04T16:23:01-05:00
New Revision: dd047c5b64944bae830b9fecf53f8d11ff41386e

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

LOG: [Flang] remove setting lowerbound for non existing dimension in shift runtime test case (NFC) (#76990)

The shift2 array only has 1 dimension but the lower bound for a second
dimension is being set causing a seg fault on AIX.

Co-authored-by: Mark Danial <mark.danial at ibm.com>

Added: 
    

Modified: 
    flang/unittests/Runtime/Transformational.cpp

Removed: 
    


################################################################################
diff  --git a/flang/unittests/Runtime/Transformational.cpp b/flang/unittests/Runtime/Transformational.cpp
index 942a20647ded78..5678ea25157755 100644
--- a/flang/unittests/Runtime/Transformational.cpp
+++ b/flang/unittests/Runtime/Transformational.cpp
@@ -250,7 +250,6 @@ TEST(Transformational, Shifts) {
   auto shift2{MakeArray<TypeCategory::Integer, 1>(
       std::vector<int>{2}, std::vector<std::int8_t>{1, -1})};
   shift2->GetDimension(0).SetLowerBound(-1); // shouldn't matter
-  shift2->GetDimension(1).SetLowerBound(2);
   RTNAME(Cshift)(result, *array, *shift2, 2, __FILE__, __LINE__);
   EXPECT_EQ(result.type(), array->type());
   EXPECT_EQ(result.rank(), 2);


        


More information about the flang-commits mailing list