[flang] Validate SIZE(x,DIM=n) dimension for assumed-size array x
authorpeter klausler <pklausler@nvidia.com>
Mon, 13 Sep 2021 20:45:30 +0000 (13:45 -0700)
committerpeter klausler <pklausler@nvidia.com>
Fri, 17 Sep 2021 17:14:18 +0000 (10:14 -0700)
commit9245f35580ca0cce147ec9cebfa431fa5b7feac4
treed8e6bd0c0543709392886aee8401e2dc7890a534
parent20afd38651cc37961a7353771fd3f34aec5d2a34
[flang] Validate SIZE(x,DIM=n) dimension for assumed-size array x

Catch invalid attempts to extract the unknowable extent of the last
dimension of an assumed-size array dummy argument, and clean up
problems with assumed-rank arguments in similar circumstances
exposed by testing the fix.

Differential Revision: https://reviews.llvm.org/D109918
flang/include/flang/Evaluate/tools.h
flang/include/flang/Semantics/tools.h
flang/lib/Evaluate/fold-integer.cpp
flang/lib/Evaluate/formatting.cpp
flang/lib/Evaluate/shape.cpp
flang/lib/Evaluate/tools.cpp
flang/lib/Evaluate/variable.cpp
flang/lib/Semantics/check-select-rank.cpp
flang/test/Semantics/select-rank.f90