[flang] Associate entities are variables
authorPeter Klausler <pklausler@nvidia.com>
Thu, 9 Feb 2023 18:00:12 +0000 (10:00 -0800)
committerPeter Klausler <pklausler@nvidia.com>
Tue, 14 Feb 2023 15:50:45 +0000 (07:50 -0800)
commit3af88305e443eb0a7930b5d7f2e26a609b65e556
tree3017b04fb9df21e4f7160301880c9c3f33220022
parentfefe729f0f4a787fae15fdcac8e2d92bc1e661cb
[flang] Associate entities are variables

A more precise reading of the standard for associate entities, like "x"
in ASSOCIATE(x => selector), shows that the utility predicates used for
determining their status as variables should treat them as variables
(not necessarily definable), whatever the selector is.  Currently
the cases where the selector is an expression or a designator with a
vector subscript are not properly considered to be variables.
(See Fortran 2018, 11.1.3.3 paragraph 5.)

Differential Revision: https://reviews.llvm.org/D143835
flang/lib/Evaluate/tools.cpp