[all-commits] [llvm/llvm-project] fee3f0: [flang] Warn about dangerous actual argument assoc...

Peter Klausler via All-commits all-commits at lists.llvm.org
Thu Mar 2 09:16:39 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fee3f0bd4acb8497d21f8030a62f30d8c6ea0f96
      https://github.com/llvm/llvm-project/commit/fee3f0bd4acb8497d21f8030a62f30d8c6ea0f96
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2023-03-02 (Thu, 02 Mar 2023)

  Changed paths:
    M flang/lib/Semantics/check-call.cpp
    A flang/test/Semantics/call34.f90

  Log Message:
  -----------
  [flang] Warn about dangerous actual argument association with TARGET dummy arguments

The actual argument associated with a dummy argument with the TARGET attribute is
not required to be itself a target or pointer, or even to be a variable, but in
those cases, any pointer that is associated with the dummy argument during the
execution of the procedure is either going to be invalid afterwards because it
points to temporary storage that has since been deallocated or an optimization
time bomb because it aliases an object that isn't a target.  Add warnings for
these cases.

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




More information about the All-commits mailing list