[flang] Check for another case of ambiguous generic resolution
authorPeter Klausler <pklausler@nvidia.com>
Sat, 17 Dec 2022 18:19:42 +0000 (10:19 -0800)
committerPeter Klausler <pklausler@nvidia.com>
Sat, 17 Dec 2022 18:47:38 +0000 (10:47 -0800)
commit412f391ca4ba21f3d82df31ef4bb755d5d1e2909
treee5196b60bfd4d4641b6da9abf7a932fe037871f1
parent07af0e2d3e8485ad6f84da1ad9851538b62d2942
[flang] Check for another case of ambiguous generic resolution

When specific procedures of a generic have dummy procedures,
underspecified actual procedures can match more than one specific
procedure.  This can happen with actual procedures that are
externals with implicit interfaces, including the completely
unspecified case of a PROCEDURE() or EXTERNAL that doesn't even
differentiate between a subroutine and a function.

Generic resolution can already handle cases of ambiguous resolution
due to the use of NULL() actual arguments with no MOLD= arguments
to define their types.  Extend the handling of ambiguous actual
arguments to include the case of underspecified actual procedures.

Differential Revision: https://reviews.llvm.org/D140151
flang/include/flang/Semantics/expression.h
flang/lib/Semantics/expression.cpp
flang/test/Semantics/resolve63.f90