[flang-commits] [PATCH] D143821: [flang] Conform with standard (mostly) for character length mismatches on arguments

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Sat Feb 11 11:19:42 PST 2023


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

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.


https://reviews.llvm.org/D143821

Files:
  flang/lib/Evaluate/characteristics.cpp
  flang/lib/Semantics/check-call.cpp
  flang/test/Lower/character-substrings.f90
  flang/test/Semantics/call03.f90
  flang/test/Semantics/call33.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143821.496702.patch
Type: text/x-patch
Size: 7558 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230211/df40cd4c/attachment-0001.bin>


More information about the flang-commits mailing list