From 725115d7bba2faf3d0c21442f4661dea77b8a77c Mon Sep 17 00:00:00 2001 From: Renaud Kauffmann <50748669+Renaud-K@users.noreply.github.com> Date: Mon, 13 Nov 2023 18:55:07 -0800 Subject: [PATCH] Fix fir::unwrapSeqOrBoxedSeqType (#72171) Fixing fir::unwrapSeqOrBoxedSeqType check for fir::BaseBoxType to add support for fir::BoxType and fir::ClassType --- flang/lib/Optimizer/Dialect/FIRType.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flang/lib/Optimizer/Dialect/FIRType.cpp b/flang/lib/Optimizer/Dialect/FIRType.cpp index efaead599bee16..730317a9bc238b 100644 --- a/flang/lib/Optimizer/Dialect/FIRType.cpp +++ b/flang/lib/Optimizer/Dialect/FIRType.cpp @@ -405,7 +405,7 @@ mlir::Type unwrapAllRefAndSeqType(mlir::Type ty) { mlir::Type unwrapSeqOrBoxedSeqType(mlir::Type ty) { if (auto seqTy = ty.dyn_cast()) return seqTy.getEleTy(); - if (auto boxTy = ty.dyn_cast()) { + if (auto boxTy = ty.dyn_cast()) { auto eleTy = unwrapRefType(boxTy.getEleTy()); if (auto seqTy = eleTy.dyn_cast()) return seqTy.getEleTy();