[flang-commits] [flang] 962e503 - [flang] Take into account SubprogramDetails in GetInterfaceSymbol
Jean Perier via flang-commits
flang-commits at lists.llvm.org
Thu Sep 30 14:06:58 PDT 2021
Author: Jean Perier
Date: 2021-09-30T23:06:32+02:00
New Revision: 962e503cc8bc411f7523cc393acae8aae425b1c4
URL: https://github.com/llvm/llvm-project/commit/962e503cc8bc411f7523cc393acae8aae425b1c4
DIFF: https://github.com/llvm/llvm-project/commit/962e503cc8bc411f7523cc393acae8aae425b1c4.diff
LOG: [flang] Take into account SubprogramDetails in GetInterfaceSymbol
When the ProcRef is Symbol is a SubprogramDetails, the interface is
the SubprogramDetails. Do not return nullptr.
Differential Revision: https://reviews.llvm.org/D110853
Added:
Modified:
flang/lib/Evaluate/call.cpp
Removed:
################################################################################
diff --git a/flang/lib/Evaluate/call.cpp b/flang/lib/Evaluate/call.cpp
index 395751acabda..18d51a2b652a 100644
--- a/flang/lib/Evaluate/call.cpp
+++ b/flang/lib/Evaluate/call.cpp
@@ -123,6 +123,8 @@ const Symbol *ProcedureDesignator::GetInterfaceSymbol() const {
} else if (const auto *binding{
ultimate.detailsIf<semantics::ProcBindingDetails>()}) {
return &binding->symbol();
+ } else if (ultimate.has<semantics::SubprogramDetails>()) {
+ return &ultimate;
}
}
return nullptr;
More information about the flang-commits
mailing list