[flang] Allow NULL() actual argument for procedure pointer dummy argument with unspec...
authorPeter Klausler <pklausler@nvidia.com>
Thu, 25 Aug 2022 17:27:32 +0000 (10:27 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Thu, 25 Aug 2022 23:23:11 +0000 (16:23 -0700)
commit4e3bf225b7f8e540da3a96cf4f4001a68d8b2f57
tree5acda92b4b15622a52b6856d171c04afaa2d0d08
parentf9ceb71542e0b15dd57a60c2bf379caeb4a34bec
[flang] Allow NULL() actual argument for procedure pointer dummy argument with unspecified intent

A NULL() pointer is a valid actual argument for a procedure pointer dummy
argument whose intent is INTENT(IN); it should also be acceptable for a
procedure pointer dummy argument with unspecified intent.

Also make it possible to discern null object pointers from null procedure
pointers, so that an attempt to use one in place of the other in a context
where the distinction matters will still elicit an error.

Differential Revision: https://reviews.llvm.org/D132687
flang/include/flang/Evaluate/tools.h
flang/lib/Evaluate/check-expression.cpp
flang/lib/Evaluate/intrinsics.cpp
flang/lib/Evaluate/tools.cpp
flang/lib/Semantics/check-call.cpp
flang/lib/Semantics/data-to-inits.cpp
flang/test/Semantics/call09.f90