[all-commits] [llvm/llvm-project] c6ec6e: [flang] Disallow scalar argument to SIZE/LBOUND/UB...

Peter Klausler via All-commits all-commits at lists.llvm.org
Tue Mar 28 04:40:00 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c6ec6e30867d07d5f641cdc34463a9588bdb9d22
      https://github.com/llvm/llvm-project/commit/c6ec6e30867d07d5f641cdc34463a9588bdb9d22
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2023-03-28 (Tue, 28 Mar 2023)

  Changed paths:
    M flang/lib/Evaluate/intrinsics.cpp
    M flang/test/Semantics/misc-intrinsics.f90
    M flang/test/Semantics/symbol14.f90

  Log Message:
  -----------
  [flang] Disallow scalar argument to SIZE/LBOUND/UBOUND

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.

Differential Revision: https://reviews.llvm.org/D146587




More information about the All-commits mailing list