[flang] Catch more bad DATA statement objects
authorPeter Klausler <pklausler@nvidia.com>
Thu, 16 Mar 2023 00:57:58 +0000 (17:57 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Mon, 27 Mar 2023 23:10:03 +0000 (16:10 -0700)
commit1eb9948f02560912c67757e18d105d18609935ce
tree40312ae880afae73565c88242be2332a1f853595
parentda18ceb4b1d54829f73ae4373b59f6ed30314115
[flang] Catch more bad DATA statement objects

The data statement variable checker is missing some cases, like expressions
that are not variables.  Run the checker first to enjoy its very specific
error messages, but when it finds no problems, still apply a general
check that an expression is a "variable" and also not a constant expression
at the top level as a backstop.

Differential Revision: https://reviews.llvm.org/D146580
flang/lib/Semantics/check-data.cpp
flang/test/Semantics/data03.f90