[all-commits] [llvm/llvm-project] cd9aff: [flang] Catch and diagnose attempts to misuse NULL()

Peter Klausler via All-commits all-commits at lists.llvm.org
Sat Oct 29 12:01:09 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cd9aff8aa87d5397bb674d1e35904314dca72aac
      https://github.com/llvm/llvm-project/commit/cd9aff8aa87d5397bb674d1e35904314dca72aac
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2022-10-29 (Sat, 29 Oct 2022)

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

  Log Message:
  -----------
  [flang] Catch and diagnose attempts to misuse NULL()

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.

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




More information about the All-commits mailing list