[flang-commits] [PATCH] D117149: [flang] RESHAPE(PAD=) can be arbitrary array rank
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Wed Jan 12 13:59:06 PST 2022
klausler created this revision.
klausler added a reviewer: vdonaldson.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
klausler requested review of this revision.
The "pad=" argument in the intrinsic function table entry for RESHAPE
has a Rank::Array constraint, and that would be fine if not for RESHAPE
already having an earlier argument that's Rank::Array. It's the only
intrinsic that has multiple Rank::Array arguments. The checking for
the Rank::Array constraint was enforcing that multiple occurrences
of it have the same rank in a call, and that's not appropriate.
https://reviews.llvm.org/D117149
Files:
flang/lib/Evaluate/intrinsics.cpp
Index: flang/lib/Evaluate/intrinsics.cpp
===================================================================
--- flang/lib/Evaluate/intrinsics.cpp
+++ flang/lib/Evaluate/intrinsics.cpp
@@ -1496,8 +1496,6 @@
if (!arrayArg) {
arrayArg = arg;
arrayArgName = d.keyword;
- } else {
- argOk &= rank == arrayArg->Rank();
}
break;
case Rank::coarray:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117149.399443.patch
Type: text/x-patch
Size: 415 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220112/da31b617/attachment.bin>
More information about the flang-commits
mailing list