[all-commits] [llvm/llvm-project] 962863: [flang] Catch attempts to copy pointers in allocat...

Peter Klausler via All-commits all-commits at lists.llvm.org
Mon Dec 5 10:18:28 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 962863d988195917b7d2ccfb83a3a166e01ffc77
      https://github.com/llvm/llvm-project/commit/962863d988195917b7d2ccfb83a3a166e01ffc77
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2022-12-05 (Mon, 05 Dec 2022)

  Changed paths:
    M flang/include/flang/Semantics/tools.h
    M flang/lib/Semantics/assignment.cpp
    M flang/lib/Semantics/tools.cpp
    M flang/test/Semantics/call12.f90

  Log Message:
  -----------
  [flang] Catch attempts to copy pointers in allocatables in PURE

In a pure context, a pointer acquired from an INTENT(IN) dummy argument
may not be copied.  Catch the case in which the pointer is a component
of an allocatable component at some depth of nesting.

(This patch adds a new component iterator kind that is a variant of
a potential subobject component iterator; it visits all potential
subobject components, plus pointers, into which it does not descend.)

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




More information about the All-commits mailing list