[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

GitOrigin-RevId: 962e503cc8bc411f7523cc393acae8aae425b1c4
diff --git a/lib/Evaluate/call.cpp b/lib/Evaluate/call.cpp
index 395751a..18d51a2 100644
--- a/lib/Evaluate/call.cpp
+++ b/lib/Evaluate/call.cpp
@@ -123,6 +123,8 @@
     } else if (const auto *binding{
                    ultimate.detailsIf<semantics::ProcBindingDetails>()}) {
       return &binding->symbol();
+    } else if (ultimate.has<semantics::SubprogramDetails>()) {
+      return &ultimate;
     }
   }
   return nullptr;