[flang] More precise checks for NULL() operands
authorpeter klausler <pklausler@nvidia.com>
Tue, 7 Sep 2021 19:17:31 +0000 (12:17 -0700)
committerpeter klausler <pklausler@nvidia.com>
Thu, 16 Sep 2021 22:52:45 +0000 (15:52 -0700)
commitd9195d6603f2c95124e29beacec9129ae8fd616e
treefa3a802ebb7b393a6d9595e0f2159a9d80fa8682
parent0e362883182db53da9d6dd8e90f8eafb4e3b916c
[flang] More precise checks for NULL() operands

Improve checking for NULL() and NULL(MOLD=) when used as
variables and expressions outside the few contexts where
a disassociated pointer can be valid.  There were both
inappropriate errors and missing checks.

Differential Revision: https://reviews.llvm.org/D109905
flang/include/flang/Evaluate/expression.h
flang/lib/Evaluate/tools.cpp
flang/lib/Semantics/check-call.cpp
flang/lib/Semantics/check-omp-structure.cpp
flang/lib/Semantics/expression.cpp
flang/test/Semantics/resolve63.f90