aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Lower/ConvertType.cpp
diff options
context:
space:
mode:
authorValentin Clement <clementval@gmail.com>2022-07-04 12:56:47 +0200
committerValentin Clement <clementval@gmail.com>2022-07-04 13:05:14 +0200
commit740633ff08ff2d84d1f06088a12d9381b4c83c1b (patch)
treec1df5594c58e11702785ffd6ab052e86ad5cc8e9 /flang/lib/Lower/ConvertType.cpp
parentbf89d24f5319cb57e8458c1192480d17f00d4540 (diff)
downloadllvm-740633ff08ff2d84d1f06088a12d9381b4c83c1b.zip
llvm-740633ff08ff2d84d1f06088a12d9381b4c83c1b.tar.gz
llvm-740633ff08ff2d84d1f06088a12d9381b4c83c1b.tar.bz2
[flang] Add TODO for derived types with final procedure
Finalization is F2003 and although the runtime supports it already, lowering is not ensuring all the derived type are finalized properly when they should. This will require surveying the places where lowering needs to call it. Add a hard TODO for now. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D129069 Co-authored-by: Jean Perier <jperier@nvidia.com>
Diffstat (limited to 'flang/lib/Lower/ConvertType.cpp')
-rw-r--r--flang/lib/Lower/ConvertType.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/flang/lib/Lower/ConvertType.cpp b/flang/lib/Lower/ConvertType.cpp
index 783019d..0ab9d2d 100644
--- a/flang/lib/Lower/ConvertType.cpp
+++ b/flang/lib/Lower/ConvertType.cpp
@@ -288,6 +288,10 @@ struct TypeBuilder {
const Fortran::semantics::Symbol &typeSymbol = tySpec.typeSymbol();
if (mlir::Type ty = getTypeIfDerivedAlreadyInConstruction(typeSymbol))
return ty;
+
+ if (Fortran::semantics::IsFinalizable(tySpec))
+ TODO(converter.genLocation(tySpec.name()), "derived type finalization");
+
auto rec = fir::RecordType::get(context,
Fortran::lower::mangle::mangleName(tySpec));
// Maintain the stack of types for recursive references.