[all-commits] [llvm/llvm-project] 9ae4e1: [flang] Do not perform INTERNAL_CHECK for dealloca...

Valentin Clement (バレンタイン クレメン) via All-commits all-commits at lists.llvm.org
Wed Jan 18 09:55:22 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9ae4e1aea5c894a4990575c237176af0d04b641c
      https://github.com/llvm/llvm-project/commit/9ae4e1aea5c894a4990575c237176af0d04b641c
  Author: Valentin Clement <clementval at gmail.com>
  Date:   2023-01-18 (Wed, 18 Jan 2023)

  Changed paths:
    M flang/runtime/allocatable.cpp
    M flang/runtime/pointer.cpp
    M flang/unittests/Runtime/Pointer.cpp

  Log Message:
  -----------
  [flang] Do not perform INTERNAL_CHECK for deallocation of unlimited polymorphic with intrinsic type spec

When an unlimited polymorphic descriptor is establish for an intrinsic
type spec, the `PointerNullifyIntrinsic` or `AllocatableInitIntrinsic` runtime
function is called. These functions do not initialize an addendum with a derivedType.
When the deallocation on this descriptor is performed, the runtime should not
crash if the addendum is not present. This patch updates `PointerDeallocatePolymorphic`
and `AllocatableDeallocatePolymorphic` for this use case.

Depends on D141996

Reviewed By: jeanPerier, PeteSteinfeld

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




More information about the All-commits mailing list