[flang] Lower allocate for polymorphic pointer
authorValentin Clement <clementval@gmail.com>
Thu, 27 Oct 2022 18:55:43 +0000 (20:55 +0200)
committerValentin Clement <clementval@gmail.com>
Thu, 27 Oct 2022 18:56:06 +0000 (20:56 +0200)
commit06fcd149d176e87188801e77433c731013b32d74
tree4d79c686f43b8f9151ce40dc72e049fcee93f2e8
parent7841f557ea3df1987ceb1c033e458790f5828795
[flang] Lower allocate for polymorphic pointer

Lowering of allocate statement for polymoprhic pointers is a bit
different than for allocatables. A call to `PointerNullifyDerived`
runtime function is done instead of `AllocatableInitDerived`.

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D136820
flang/lib/Lower/Allocatable.cpp
flang/lib/Optimizer/CodeGen/CodeGen.cpp
flang/test/Lower/allocatable-polymorphic.f90