[flang-commits] [PATCH] D109915: flang] Accept SIZE(assumed-rank, DIM=n)
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Fri Sep 17 09:00:59 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG12ba72789747: [flang] Accept SIZE(assumed-rank, DIM=n) (authored by klausler).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109915/new/
https://reviews.llvm.org/D109915
Files:
flang/lib/Evaluate/shape.cpp
Index: flang/lib/Evaluate/shape.cpp
===================================================================
--- flang/lib/Evaluate/shape.cpp
+++ flang/lib/Evaluate/shape.cpp
@@ -500,6 +500,8 @@
[&](const semantics::ObjectEntityDetails &object) {
if (IsImpliedShape(symbol) && object.init()) {
return (*this)(object.init());
+ } else if (IsAssumedRank(symbol)) {
+ return Result{};
} else {
int n{object.shape().Rank()};
NamedEntity base{symbol};
@@ -517,12 +519,12 @@
}
},
[&](const semantics::AssocEntityDetails &assoc) {
- if (!assoc.rank()) {
- return (*this)(assoc.expr());
- } else {
+ if (assoc.rank()) { // SELECT RANK case
int n{assoc.rank().value()};
NamedEntity base{symbol};
return Result{CreateShape(n, base)};
+ } else {
+ return (*this)(assoc.expr());
}
},
[&](const semantics::SubprogramDetails &subp) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109915.373243.patch
Type: text/x-patch
Size: 1106 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210917/796d214d/attachment.bin>
More information about the flang-commits
mailing list