[flang-commits] [PATCH] D125342: [flang] Fix check for assumed-size arguments to SHAPE() & al.
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Wed May 11 10:33:31 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd80d812df0c8: [flang] Fix check for assumed-size arguments to SHAPE() & al. (authored by klausler).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125342/new/
https://reviews.llvm.org/D125342
Files:
flang/lib/Evaluate/intrinsics.cpp
Index: flang/lib/Evaluate/intrinsics.cpp
===================================================================
--- flang/lib/Evaluate/intrinsics.cpp
+++ flang/lib/Evaluate/intrinsics.cpp
@@ -1563,8 +1563,8 @@
// (A previous error message for UBOUND will take precedence
// over this one, as this error is caught by the second entry
// for UBOUND.)
- if (std::optional<Shape> shape{GetShape(context, *arg)}) {
- if (!shape->empty() && !shape->back().has_value()) {
+ if (const Symbol * argSym{GetLastSymbol(*arg)}) {
+ if (semantics::IsAssumedSizeArray(*argSym)) {
if (strcmp(name, "shape") == 0) {
messages.Say(arg->sourceLocation(),
"The '%s=' argument to the intrinsic function '%s' may not be assumed-size"_err_en_US,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125342.428709.patch
Type: text/x-patch
Size: 845 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220511/61138141/attachment.bin>
More information about the flang-commits
mailing list