[flang-commits] [PATCH] D136893: [flang] Catch and diagnose attempts to misuse NULL()

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu Oct 27 15:23:24 PDT 2022


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

Some intrinsic functions can handle NULL() as an actual argument; most
can't.  Distinguish the two with a new ArgFlag facility in the intrinsic
procedure table.  Also transform some confusing Optionality codes that
were standing in for flags into ArgFlags.  Last, return false for a NULL()
pointer from the utility IsActuallyConstant(), ensuring that it can
still deal with a nested NULL() for components in structure constructors.


https://reviews.llvm.org/D136893

Files:
  flang/lib/Evaluate/check-expression.cpp
  flang/lib/Evaluate/fold.cpp
  flang/lib/Evaluate/intrinsics.cpp
  flang/test/Semantics/null01.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136893.471306.patch
Type: text/x-patch
Size: 16728 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20221027/9910f835/attachment-0001.bin>


More information about the flang-commits mailing list