[flang] Make sure allocatable components are initialzed for temp derived-type
authorValentin Clement <clementval@gmail.com>
Fri, 2 Sep 2022 18:43:18 +0000 (20:43 +0200)
committerValentin Clement <clementval@gmail.com>
Fri, 2 Sep 2022 18:43:38 +0000 (20:43 +0200)
commitc55bf526356bab67fcd65eafb2ca253c20e0715e
treef57b425d0978680876cb199faa8a9df39e34f566
parent10194a51a9d304ab9f68432f244749c672f9012a
[flang] Make sure allocatable components are initialzed for temp derived-type

Runtime functions expect clean unallocated state for descriptor. This
patch adds a call to the runtime function to initialize the temporary
derived-type created.

Reviewed By: vdonaldson

Differential Revision: https://reviews.llvm.org/D133189
flang/lib/Lower/ConvertExpr.cpp
flang/test/Lower/derived-type-temp.f90 [new file with mode: 0644]