[flang] Fix checking of TBP bindings
authorPeter Klausler <pklausler@nvidia.com>
Tue, 7 Mar 2023 01:32:12 +0000 (17:32 -0800)
committerPeter Klausler <pklausler@nvidia.com>
Fri, 10 Mar 2023 17:59:06 +0000 (09:59 -0800)
commit17f32bdd37363c1b1f14a263b160345d4a0804bd
tree3af9bdcff9f950a74fe170ee5a3947385656ef17
parent8cfdc32be553eeb7330f7f7f667daecbfbf098e2
[flang] Fix checking of TBP bindings

Non-DEFERRED procedure binding checking can't blindly accept
all procedures defined in modules -- they can't be ABSTRACT
interfaces.  And GetUltimate() must be used rather than
FindSubprogram(); the latter will resolve to a procedure's
interface in the case of "procedure(interface) :: external",
not "external".

Differential Revision: https://reviews.llvm.org/D145749
flang/include/flang/Semantics/symbol.h
flang/include/flang/Semantics/tools.h
flang/lib/Semantics/resolve-names.cpp
flang/lib/Semantics/tools.cpp
flang/test/Semantics/resolve32.f90