diff --git a/flang/lib/Lower/ConvertType.cpp b/flang/lib/Lower/ConvertType.cpp --- a/flang/lib/Lower/ConvertType.cpp +++ b/flang/lib/Lower/ConvertType.cpp @@ -288,6 +288,10 @@ 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.