diff --git a/flang/lib/Evaluate/call.cpp b/flang/lib/Evaluate/call.cpp --- a/flang/lib/Evaluate/call.cpp +++ b/flang/lib/Evaluate/call.cpp @@ -123,6 +123,8 @@ } else if (const auto *binding{ ultimate.detailsIf()}) { return &binding->symbol(); + } else if (ultimate.has()) { + return &ultimate; } } return nullptr;