[flang] Catch impure defined assignments in DO CONCURRENT
authorPeter Klausler <pklausler@nvidia.com>
Fri, 17 Mar 2023 23:01:47 +0000 (16:01 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Tue, 28 Mar 2023 00:25:26 +0000 (17:25 -0700)
commitb0f02cee2b5b9a767705db9b9aa0663b49742c4e
tree8de3959912369592be5d4bfd21358a8d63c0716d
parent30ce6fbfaae4a6c03fe18d06163e696054a692cb
[flang] Catch impure defined assignments in DO CONCURRENT

The semantic checking of DO CONCURRENT bodies looks only at the
parse tree, not the typed expressions produced from it, so it
misses calls to defined assignment subroutines that arise from
assignment statements that resolve via generic interfaces into
subroutine calls.  Extend the checking to peek into the typed
assignment operations left on the parse tree by semantics.

Differential Revision: https://reviews.llvm.org/D146585
flang/lib/Semantics/check-do-forall.cpp
flang/test/Semantics/doconcurrent01.f90