From ea1e767a060ca2c9deb0326f20ccc5291100e530 Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Thu, 27 Oct 2022 20:56:39 +0200 Subject: [flang] Carry dynamic type when emboxing polymorphic pointer In order to be passed as passed-object in the dynamic dispatch, the polymorphic pointer entity are emboxed. In this process, the dynamic type must be preserve and pass to fir.embox as the tdesc operand. This patch introduce a new ExtendedValue that allow to carry over the dynamic type when the value is unboxed. Depends on D136820 Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D136824 --- flang/lib/Frontend/CompilerInvocation.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'flang/lib/Frontend/CompilerInvocation.cpp') diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp index 761300b..e79ca8d 100644 --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -869,4 +869,5 @@ void CompilerInvocation::setLoweringOptions() { // Lower TRANSPOSE as a runtime call under -O0. loweringOpts.setOptimizeTranspose(codegenOpts.OptimizationLevel > 0); + loweringOpts.setPolymorphicTypeImpl(true); } -- cgit v1.1