[PATCH] D99665: [flang] Refine checks for pointer initialization targets

Peter Klausler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 31 10:36:43 PDT 2021


klausler added inline comments.


================
Comment at: flang/lib/Evaluate/check-expression.cpp:264
+  bool CheckVarOrComponent(const semantics::Symbol &symbol) {
+    const Symbol &ultimate{symbol.GetUltimate()};
+    if (IsAllocatable(ultimate)) {
----------------
PeteSteinfeld wrote:
> Should this call to `GetUltimate()` be to `GetAssociationRoot()`?
Construct associations are handled explicitly in the one caller (above) where they matter (ca. line 185).


================
Comment at: flang/lib/Evaluate/check-expression.cpp:614
   Result operator()(const semantics::Symbol &symbol) const {
-    if (symbol.attrs().test(semantics::Attr::CONTIGUOUS) ||
-        symbol.Rank() == 0) {
+    const auto &ultimate{symbol.GetUltimate()};
+    if (ultimate.attrs().test(semantics::Attr::CONTIGUOUS) ||
----------------
PeteSteinfeld wrote:
> Should this be a call to `GetAssociationRoot()`?
Construct associations are handled in the base class (invoked below, lines 625-626).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99665



More information about the llvm-commits mailing list