[all-commits] [llvm/llvm-project] f28c1a: [flang] Conform with standard (mostly) for charact...

Peter Klausler via All-commits all-commits at lists.llvm.org
Mon Feb 13 15:08:03 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f28c1a9df2e3a940fa72c2890a965cbbe2433967
      https://github.com/llvm/llvm-project/commit/f28c1a9df2e3a940fa72c2890a965cbbe2433967
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2023-02-13 (Mon, 13 Feb 2023)

  Changed paths:
    M flang/lib/Evaluate/characteristics.cpp
    M flang/lib/Semantics/check-call.cpp
    M flang/test/Lower/character-substrings.f90
    A flang/test/Semantics/call33.f90

  Log Message:
  -----------
  [flang] Conform with standard (mostly) for character length mismatches on arguments

Fortran 2018 defines some flavors of dummy arguments to require exact
matching of character lengths between dummy and actual arguments;
these situations tend to be those in which the interface must be
explicit and a descriptor is involved: assumed shape, assumed rank,
allocatable, and pointer.

Fortran allows an actual argument in other cases to have a longer
length than the dummy argument; as a common extension, we support a
shorter actual argument as well by means of blank padding, but should
emit a warning.

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




More information about the All-commits mailing list