[flang] Add one semantic check for masked array assignment
authorPeixinQiao <qiaopeixin@huawei.com>
Fri, 6 May 2022 14:19:20 +0000 (22:19 +0800)
committerPeixinQiao <qiaopeixin@huawei.com>
Fri, 6 May 2022 14:19:20 +0000 (22:19 +0800)
commit2472b6869a6eeb198a4e982fd7c3ffc89dd4f6f5
treee705d2533bfaa3e4abb2da8832da46074844f9a7
parentffc7f9d542370eb72ad1f4bf79f763ca685bab8b
[flang] Add one semantic check for masked array assignment

As Fortran 2018 states, in each where-assignment-stmt, the mask-expr and
the variable being defined shall be arrays of the same shape. The
previous check does not consider checking if it is an array.

Reviewed By: klausler

Differential Revision: https://reviews.llvm.org/D125022
flang/lib/Semantics/assignment.cpp
flang/test/Semantics/assign01.f90
flang/test/Semantics/assign04.f90