[flang] Fix generic/specific procedure confusion
authorpeter klausler <pklausler@nvidia.com>
Fri, 25 Jun 2021 17:35:03 +0000 (10:35 -0700)
committerpeter klausler <pklausler@nvidia.com>
Fri, 25 Jun 2021 18:54:29 +0000 (11:54 -0700)
commit3cc5d4ff8e4e59cc45f370655c7762e36b223d1d
treedb2353f1354bb47c37222dafccbe0c85e18f3e14
parentb8c8bb07692cfb9a78049fd2fb5c46a91ee2e90f
[flang] Fix generic/specific procedure confusion

A recent change that extended semantic analysis for actual arguments
that associate with procedure dummy arguments exposed some bugs in
regression test suites due to points of confusion in symbol table
handling in situations where a generic interface contains a specific
procedure of the same name.  When passing that name as an actual
argument, for example, it's necessary to take this possibility into
account because the symbol for the generic interface shadows the
symbol of the same name for the specific procedure, which is
what needs to be checked.  So add a small utility that bypasses
the symbol for a generic interface in this case, and use it
where needed.

Differential Revision: https://reviews.llvm.org/D104929
flang/include/flang/Parser/parse-tree.h
flang/include/flang/Semantics/tools.h
flang/lib/Evaluate/fold-reduction.h
flang/lib/Semantics/expression.cpp
flang/lib/Semantics/resolve-names.cpp
flang/lib/Semantics/tools.cpp
flang/runtime/type-info.h