[flang] Add more checks on WHERE and FORALL
authorTim Keith <tkeith@nvidia.com>
Thu, 20 Feb 2020 22:54:46 +0000 (14:54 -0800)
committerTim Keith <tkeith@nvidia.com>
Fri, 21 Feb 2020 23:47:01 +0000 (15:47 -0800)
commite0ba2b8783ec6feb49af89f1aa3378069054a109
tree953b4cf1f6cb4cb07946bcadff4a583cc2e4ccf9
parent703c56132b16f2500b5856e44c1a297f314a2378
[flang] Add more checks on WHERE and FORALL

Check that masks and LHS of assignments in WHERE statements and
constructs have consistent shapes. They must all have the same rank and
any extents that are compile-time constants must match.

Emit a warning for assignments in FORALL statements and constructs where
the LHS does not reference each of the index variables.

Original-commit: flang-compiler/f18@8b04dbebcf5621cfd571a8c45878cebcd1a1bfb0
Reviewed-on: https://github.com/flang-compiler/f18/pull/1009
flang/include/flang/semantics/semantics.h
flang/lib/semantics/assignment.cpp
flang/lib/semantics/assignment.h
flang/lib/semantics/check-do-forall.cpp
flang/lib/semantics/semantics.cpp
flang/test/semantics/assign01.f90
flang/test/semantics/forall01.f90