[flang-commits] [PATCH] D104385: [flang] preserve symbol in DescriptorInquiry

Jean Perier via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu Jun 17 03:42:46 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG1a4af2e45ee5: [flang] preserve symbol in DescriptorInquiry (authored by jeanPerier).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104385

Files:
  flang/lib/Evaluate/shape.cpp
  flang/lib/Evaluate/variable.cpp


Index: flang/lib/Evaluate/variable.cpp
===================================================================
--- flang/lib/Evaluate/variable.cpp
+++ flang/lib/Evaluate/variable.cpp
@@ -269,7 +269,7 @@
       return len;
     } else if (IsDescriptor(ultimate) && !ultimate.owner().IsDerivedType()) {
       return Expr<SubscriptInteger>{DescriptorInquiry{
-          NamedEntity{ultimate}, DescriptorInquiry::Field::Len}};
+          NamedEntity{symbol}, DescriptorInquiry::Field::Len}};
     }
   }
   return std::nullopt;
Index: flang/lib/Evaluate/shape.cpp
===================================================================
--- flang/lib/Evaluate/shape.cpp
+++ flang/lib/Evaluate/shape.cpp
@@ -514,16 +514,10 @@
           [&](const semantics::ProcBindingDetails &binding) {
             return (*this)(binding.symbol());
           },
-          [&](const semantics::UseDetails &use) {
-            return (*this)(use.symbol());
-          },
-          [&](const semantics::HostAssocDetails &assoc) {
-            return (*this)(assoc.symbol());
-          },
           [](const semantics::TypeParamDetails &) { return ScalarShape(); },
           [](const auto &) { return Result{}; },
       },
-      symbol.details());
+      symbol.GetUltimate().details());
 }
 
 auto GetShapeHelper::operator()(const Component &component) const -> Result {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104385.352668.patch
Type: text/x-patch
Size: 1351 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210617/99a0e293/attachment.bin>


More information about the flang-commits mailing list