[flang] Fix the vector version of EOSHIFT with a BOUNDARY argument
When the vector version of EOSHIFT was called, the BOUNDARY argument was being
ignored. I fixed that and added a test that would not pass without this fix.
Differential Revision: https://reviews.llvm.org/D108249
diff --git a/flang/runtime/transformational.cpp b/flang/runtime/transformational.cpp
index 3fc294b..1bf9338 100644
--- a/flang/runtime/transformational.cpp
+++ b/flang/runtime/transformational.cpp
@@ -284,6 +284,8 @@
SubscriptValue sourceAt{lb + j - 1 + shift};
if (sourceAt >= lb && sourceAt < lb + extent) {
CopyElement(result, &j, source, &sourceAt, terminator);
+ } else if (boundary) {
+ CopyElement(result, &j, *boundary, 0, terminator);
}
}
}