[flang-commits] [PATCH] D147052: [flang] Fix checking of pointer passed to assumed-rank
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Tue Mar 28 11:57:06 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG50f1476a9748: [flang] Fix checking of pointer passed to assumed-rank (authored by klausler).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147052/new/
https://reviews.llvm.org/D147052
Files:
flang/lib/Semantics/pointer-assignment.cpp
Index: flang/lib/Semantics/pointer-assignment.cpp
===================================================================
--- flang/lib/Semantics/pointer-assignment.cpp
+++ flang/lib/Semantics/pointer-assignment.cpp
@@ -315,7 +315,8 @@
"Target type %s is not compatible with pointer type %s"_err_en_US,
rhsType->type().AsFortran(), lhsType_->type().AsFortran()};
- } else if (!isBoundsRemapping_) {
+ } else if (!isBoundsRemapping_ &&
+ !lhsType_->attrs().test(TypeAndShape::Attr::AssumedRank)) {
int lhsRank{evaluate::GetRank(lhsType_->shape())};
int rhsRank{evaluate::GetRank(rhsType->shape())};
if (lhsRank != rhsRank) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147052.509094.patch
Type: text/x-patch
Size: 694 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230328/3a4f5cb9/attachment-0001.bin>
More information about the flang-commits
mailing list