[flang] Apply definability checks in ALLOCATE/DEALLOCATE statements
authorPeter Klausler <pklausler@nvidia.com>
Sat, 17 Dec 2022 17:11:40 +0000 (09:11 -0800)
committerPeter Klausler <pklausler@nvidia.com>
Sat, 17 Dec 2022 17:46:16 +0000 (09:46 -0800)
commitfb792ebaf2114ad11d673cf891ae560e2e604711
tree238d70b174cc31e38651b5fe7f392d13c2d694e3
parent1033289a3fe77a0ccb10d67516d8bd870f974497
[flang] Apply definability checks in ALLOCATE/DEALLOCATE statements

The pointers and allocatables that appear in ALLOCATE and DEALLOCATE
statements need to be subject to the general definability checks so
that problems with e.g. PROTECTED objects can be caught.

(Also: regularize the capitalization of the DEALLOCATE error messages
while I'm in here so that they're consistent with the messages that
can come out for ALLOCATE.)

Differential Revision: https://reviews.llvm.org/D140149
flang/lib/Semantics/check-allocate.cpp
flang/lib/Semantics/check-deallocate.cpp
flang/lib/Semantics/definable.cpp
flang/lib/Semantics/definable.h
flang/test/Semantics/allocate13.f90
flang/test/Semantics/deallocate05.f90
flang/test/Semantics/deallocate06.f90
flang/test/Semantics/dosemantics12.f90