[all-commits] [llvm/llvm-project] 90e9fc: [flang] Set declared type when NULLIFY a polymorph...

Valentin Clement (バレンタイン クレメン) via All-commits all-commits at lists.llvm.org
Mon Oct 31 03:03:26 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 90e9fcbb68a3afa3ac25aa54555355634554c349
      https://github.com/llvm/llvm-project/commit/90e9fcbb68a3afa3ac25aa54555355634554c349
  Author: Valentin Clement <clementval at gmail.com>
  Date:   2022-10-31 (Mon, 31 Oct 2022)

  Changed paths:
    M flang/include/flang/Optimizer/Builder/MutableBox.h
    M flang/include/flang/Optimizer/Builder/Runtime/Derived.h
    M flang/lib/Lower/Allocatable.cpp
    M flang/lib/Lower/Bridge.cpp
    M flang/lib/Optimizer/Builder/MutableBox.cpp
    M flang/lib/Optimizer/Builder/Runtime/Derived.cpp
    A flang/test/Lower/nullify-polymoprhic.f90

  Log Message:
  -----------
  [flang] Set declared type when NULLIFY a polymorphic pointer

Fortran standard 7.3.2.3 point 7 mentions that a diassociated
pointer dynamic type is its declared type.
in 9.7.2 note 1, when a NULLIFY statement is applied to a polymorphic pointer,
its dynamic type becomes the same as its declared type.
This patch enforce these standard points by calling the runtime function
`PointerNullifyDerived` with the declared type descriptor.

Reviewed By: jeanPerier

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




More information about the All-commits mailing list