[flang] Run-time derived type initialization and destruction
authorpeter klausler <pklausler@nvidia.com>
Mon, 19 Jul 2021 18:53:20 +0000 (11:53 -0700)
committerpeter klausler <pklausler@nvidia.com>
Tue, 20 Jul 2021 22:24:16 +0000 (15:24 -0700)
commita48e41683ae1a9b9a5bde750d3b418a205c28cc8
treef69cfc03cacc982926163fda300e8e8e67ca034a
parent40a02fae87ca7de676f6b9d96532c760130ccc68
[flang] Run-time derived type initialization and destruction

Use derived type information tables to drive default component
initialization (when needed), component destruction, and calls to
final subroutines.  Perform these operations automatically for
ALLOCATE()/DEALLOCATE() APIs for allocatables, automatics, and
pointers.  Add APIs for use in lowering to perform these operations
for non-allocatable/automatic non-pointer variables.
Data pointer component initialization supports arbitrary constant
designators, a F'2008 feature, which may be a first for Fortran
implementations.

Differential Revision: https://reviews.llvm.org/D106297
29 files changed:
flang/docs/Extensions.md
flang/include/flang/Semantics/tools.h
flang/include/flang/Semantics/type.h
flang/lib/Evaluate/shape.cpp
flang/lib/Evaluate/tools.cpp
flang/lib/Semantics/check-declarations.cpp
flang/lib/Semantics/compute-offsets.cpp
flang/lib/Semantics/resolve-names.cpp
flang/lib/Semantics/runtime-type-info.cpp
flang/lib/Semantics/tools.cpp
flang/lib/Semantics/type.cpp
flang/module/__fortran_type_info.f90
flang/runtime/CMakeLists.txt
flang/runtime/allocatable.cpp
flang/runtime/allocatable.h
flang/runtime/derived-api.cpp [new file with mode: 0644]
flang/runtime/derived-api.h [new file with mode: 0644]
flang/runtime/derived.cpp
flang/runtime/derived.h
flang/runtime/descriptor-io.h
flang/runtime/descriptor.cpp
flang/runtime/descriptor.h
flang/runtime/namelist.cpp
flang/runtime/pointer.cpp
flang/runtime/type-info.cpp
flang/runtime/type-info.h
flang/test/Semantics/call10.f90
flang/test/Semantics/offsets01.f90
flang/test/Semantics/typeinfo01.f90