[flang] Catch obscure error in defined assignment
authorPeter Klausler <pklausler@nvidia.com>
Sat, 31 Dec 2022 00:18:05 +0000 (16:18 -0800)
committerPeter Klausler <pklausler@nvidia.com>
Fri, 27 Jan 2023 21:41:39 +0000 (13:41 -0800)
commit54912dd2fbbd2e212099da94bb3aaf1bbae642c3
tree5f5b84787835149bc3b2185cab7b8d5fc361277f
parent054931dbf11687cb95576690d8f74ffd9b0da007
[flang] Catch obscure error in defined assignment

A subroutine that implements a defined assignment cannot have
a dummy argument for its second operand (the RHS of the assignment)
with the POINTER or ALLOCATABLE attributes, since the RHS of
an assignment is always an expression.  This problem is flagged
as a fatal error in other compilers, so let's make it fatal here
as well.

Differential Revision: https://reviews.llvm.org/D142752
flang/lib/Semantics/check-declarations.cpp
flang/test/Semantics/resolve65.f90