From e97fc5007e72d183085ecd408ad098b5b5e1319e Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Thu, 16 Feb 2023 14:05:03 +0100 Subject: [PATCH] [flang] Add TODO instead of crashing on assert Current code are crashing on the assert `assert(seqTy && "must be an array");`. Add a TODO instead until the support is in. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D144173 --- flang/lib/Lower/ConvertExpr.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flang/lib/Lower/ConvertExpr.cpp b/flang/lib/Lower/ConvertExpr.cpp index c7c35b5..78fa89c 100644 --- a/flang/lib/Lower/ConvertExpr.cpp +++ b/flang/lib/Lower/ConvertExpr.cpp @@ -4305,11 +4305,13 @@ private: fir::ArrayLoadOp createAndLoadSomeArrayTemp(mlir::Type type, llvm::ArrayRef shape) { + mlir::Location loc = getLoc(); + if (fir::isPolymorphicType(type)) + TODO(loc, "polymorphic array temporary"); if (ccLoadDest) return (*ccLoadDest)(shape); auto seqTy = type.dyn_cast(); assert(seqTy && "must be an array"); - mlir::Location loc = getLoc(); // TODO: Need to thread the LEN parameters here. For character, they may // differ from the operands length (e.g concatenation). So the array loads // type parameters are not enough. -- 2.7.4