[flang-commits] [PATCH] D125123: [flang] Correct actual/dummy procedure compatibility for ALLOCATABLE/POINTER functions

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Mon May 9 17:09:48 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG948d0b340b86: [flang] Correct actual/dummy procedure compatibility for ALLOCATABLE/POINTER… (authored by klausler).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125123/new/

https://reviews.llvm.org/D125123

Files:
  flang/lib/Evaluate/characteristics.cpp


Index: flang/lib/Evaluate/characteristics.cpp
===================================================================
--- flang/lib/Evaluate/characteristics.cpp
+++ flang/lib/Evaluate/characteristics.cpp
@@ -788,7 +788,10 @@
     return false;
   } else if (const auto *ifaceTypeShape{std::get_if<TypeAndShape>(&u)}) {
     if (const auto *actualTypeShape{std::get_if<TypeAndShape>(&actual.u)}) {
-      if (ifaceTypeShape->shape() != actualTypeShape->shape()) {
+      if (ifaceTypeShape->Rank() != actualTypeShape->Rank()) {
+        return false;
+      } else if (!attrs.test(Attr::Allocatable) && !attrs.test(Attr::Pointer) &&
+          ifaceTypeShape->shape() != actualTypeShape->shape()) {
         return false;
       } else {
         return ifaceTypeShape->type().IsTkCompatibleWith(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125123.428242.patch
Type: text/x-patch
Size: 792 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220510/ffd9bd0c/attachment.bin>


More information about the flang-commits mailing list