[flang] Refine semantic checks for procedure pointer assignment
authorPeter Klausler <pklausler@nvidia.com>
Fri, 8 Jul 2022 20:38:31 +0000 (13:38 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Wed, 13 Jul 2022 21:56:50 +0000 (14:56 -0700)
commit62d874f203078896b4f059f7aa4f106e8cbab4da
tree46d5bcc1e3ee279f669320df24e2c773fdd67357
parent202b327f5d293a6f795a01933835b5ad53d8ed42
[flang] Refine semantic checks for procedure pointer assignment

Some procedure pointers and EXTERNAL procedures have neither
explicit interfaces nor result types; these procedures are obviously
not known to be functions, but they could be, so semantics must not
assume that they are necessarily subroutines.  Refine the procedure
pointer / dummy procedure compatibility check to handle these more
ambiguous cases and not elicit inappropriate error messages.

Differential Revision: https://reviews.llvm.org/D129674
13 files changed:
flang/include/flang/Evaluate/characteristics.h
flang/include/flang/Evaluate/tools.h
flang/lib/Evaluate/characteristics.cpp
flang/lib/Evaluate/intrinsics.cpp
flang/lib/Evaluate/tools.cpp
flang/lib/Semantics/check-call.cpp
flang/lib/Semantics/pointer-assignment.cpp
flang/test/Semantics/assign03.f90
flang/test/Semantics/associated.f90
flang/test/Semantics/call09.f90
flang/test/Semantics/call20.f90
flang/test/Semantics/null01.f90
flang/test/Semantics/resolve46.f90