[flang] Allow assignment to host association in BLOCK in PURE subprogram
authorPeter Klausler <pklausler@nvidia.com>
Tue, 26 Jul 2022 01:03:40 +0000 (18:03 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Sun, 7 Aug 2022 21:48:53 +0000 (14:48 -0700)
commite6373de53d35ebc0e9b0d62e664b7718f589b28e
tree72e04017bc8b163baa5ea6763764e2b6d10ed429
parent608131b1f94d895e848405215f29c30822f93603
[flang] Allow assignment to host association in BLOCK in PURE subprogram

We need to distinguish BLOCK host association from subprogram host
association when checking assignments in PURE subprograms.
The specific case that is not allowed is an assignment to a variable
from the scope around the PURE subprogram.

Differential Revision: https://reviews.llvm.org/D131098
flang/include/flang/Semantics/tools.h
flang/lib/Semantics/assignment.cpp
flang/lib/Semantics/tools.cpp