[flang-commits] [flang] [Flang] remove setting lowerbound for non existing dimension in shift runtime test case (NFC) (PR #76990)
via flang-commits
flang-commits at lists.llvm.org
Thu Jan 4 11:13:33 PST 2024
https://github.com/madanial0 created https://github.com/llvm/llvm-project/pull/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.
>From 4aa1bef4d7fe3134f663601838a50fa32debcc78 Mon Sep 17 00:00:00 2001
From: Mark Danial <madanial at dixon.rtp.raleigh.ibm.com>
Date: Thu, 4 Jan 2024 14:10:33 -0500
Subject: [PATCH] [Flang] remove setting lowerbound for non existing dimension
in shift runtime test case (NFC)
---
flang/unittests/Runtime/Transformational.cpp | 1 -
1 file changed, 1 deletion(-)
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