[flang-commits] [PATCH] D125131: [flang] Refine error checking in specification expressions

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri May 6 14:05:36 PDT 2022


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

The rules in the Fortran standard for specification expressions
are full of special cases and exceptions, and semantics didn't get
them exactly right.  It is valid to refer to an INTENT(OUT) dummy
argument in a specification expression in the context of a
specification inquiry function like SIZE(); it is not valid to
reference an OPTIONAL dummy argument outside of the context of
PRESENT.  This patch makes the specification expression checker
a little context-sensitive about whether it's examining an actual
argument of a specification inquiry intrinsic function or not.


https://reviews.llvm.org/D125131

Files:
  flang/lib/Evaluate/check-expression.cpp
  flang/lib/Evaluate/intrinsics.cpp
  flang/test/Semantics/spec-expr.f90
  flang/test/Semantics/symbol13.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125131.427740.patch
Type: text/x-patch
Size: 9279 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220506/a99cdb49/attachment.bin>


More information about the flang-commits mailing list