[flang] Fix constraint check on CLASS() entities
authorPeter Klausler <pklausler@nvidia.com>
Wed, 5 Jul 2023 21:03:14 +0000 (14:03 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Mon, 17 Jul 2023 19:19:30 +0000 (12:19 -0700)
commit0bb3260b7c5fe138bb8b51e04d050a94f6eb22c2
tree19807adb4d42e837dbb250d6cbd9066a29e07c5b
parentac604cc310b70c45a07fc9edeaced4b402739af1
[flang] Fix constraint check on CLASS() entities

Entities declared with CLASS() must be dummy arguments, allocatables,
or pointers.  This constraint check is currently correct for objects
but not for procedures, and getting it right needs to avoid being
confused between pointers to procedures and pointers returned by
procedures.

Differential Revision: https://reviews.llvm.org/D155491
flang/lib/Semantics/check-declarations.cpp
flang/test/Semantics/declarations06.f90 [new file with mode: 0644]
flang/test/Semantics/resolve44.f90
flang/test/Semantics/resolve71.f90