[flang-commits] [PATCH] D146587: [flang] Disallow scalar argument to SIZE/LBOUND/UBOUND

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue Mar 21 15:18:31 PDT 2023


klausler created this revision.
klausler added a reviewer: PeteSteinfeld.
klausler added a project: Flang.
Herald added subscribers: sunshaoce, jdoerfert.
Herald added a project: All.
klausler requested review of this revision.

The compiler accepts arguments of any rank, or assumed rank, to a host
of intrinsic inquiry functions.  For scalars, this is correct for most
of them, but the standard (and other compilers) prohibit scalar arguments
to SIZE, LBOUND, and UBOUND (without DIM=).

There are meaningful interpretations for these intrinsic inquiries
on scalars, but since there's no portability concern here, continuing
to support them would be an unjustifiable extension.


https://reviews.llvm.org/D146587

Files:
  flang/lib/Evaluate/intrinsics.cpp
  flang/test/Semantics/misc-intrinsics.f90
  flang/test/Semantics/symbol14.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146587.507156.patch
Type: text/x-patch
Size: 6276 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230321/5cd31270/attachment.bin>


More information about the flang-commits mailing list