[flang] Fix bogus errors from SIZE/SHAPE/UBOUND on assumed-shape
authorPeter Klausler <pklausler@nvidia.com>
Fri, 17 Jun 2022 21:12:13 +0000 (14:12 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Thu, 23 Jun 2022 17:32:22 +0000 (10:32 -0700)
commitb6fce8b92df5dca2115e8462ae2a1849d7dd66b0
tree631378e6c0538d10327b495a5daf7993eaf1f404
parent3e610f2cdc1e156c82f5b59c287165e769b24f40
[flang] Fix bogus errors from SIZE/SHAPE/UBOUND on assumed-shape

While it is indeed an error to use SIZE, SHAPE, or UBOUND on an
assumed-shape dummy argument without also supplying a DIM= argument
to the intrinsic function, it is *not* an error to use these intrinsic
functions on sections or expressions of such arrays.  Refine the test
used for the error message.

Differential Revision: https://reviews.llvm.org/D128391
flang/include/flang/Evaluate/tools.h
flang/lib/Evaluate/intrinsics.cpp
flang/test/Semantics/misc-intrinsics.f90