[flang] Add FORALL checking to DoChecker
authorTim Keith <tkeith@nvidia.com>
Wed, 19 Feb 2020 01:14:24 +0000 (17:14 -0800)
committerTim Keith <tkeith@nvidia.com>
Wed, 19 Feb 2020 01:14:24 +0000 (17:14 -0800)
commitee7cc4764f81db864788a6c121913f901eb25270
tree9bab140a8bda3e8d1b04779f239ac47bee0ee706
parent88aa96ffe9462bea9677c24fbd966c610918bbd0
[flang] Add FORALL checking to DoChecker

FORALL statements and constructs require a lot of the same checking
as DO CONCURRENT, so do the checks in DoChecker so that code can be
shared where possible. This requires some reorganization there.
Remove code from AssignmentChecker that did some of these checks.

Change names that contain `DoVar` or `DoVariable` to `IndexVar` to
reflect the fact that they may be DO or FORALL index variables.
Distinguish between the two when necessary with enum `IndexVarKind`.

Change some messages that referred to "concurrent-header" or
"concurrent-control" to specifically say "DO CONCURRENT" or "FORALL".

Original-commit: flang-compiler/f18@84752c492e910573e2f0ede1ed3c0417aac363b9
Reviewed-on: https://github.com/flang-compiler/f18/pull/989
Tree-same-pre-rewrite: false
18 files changed:
flang/include/flang/evaluate/tools.h
flang/include/flang/semantics/semantics.h
flang/lib/evaluate/tools.cpp
flang/lib/semantics/assignment.cpp
flang/lib/semantics/assignment.h
flang/lib/semantics/check-allocate.cpp
flang/lib/semantics/check-deallocate.cpp
flang/lib/semantics/check-do.cpp
flang/lib/semantics/check-do.h
flang/lib/semantics/check-io.cpp
flang/lib/semantics/semantics.cpp
flang/test/semantics/call11.f90
flang/test/semantics/dosemantics02.f90
flang/test/semantics/dosemantics04.f90
flang/test/semantics/dosemantics05.f90
flang/test/semantics/dosemantics09.f90
flang/test/semantics/forall01.f90
flang/test/semantics/resolve35.f90