From 39e6bd9cac68bf40adca80029ffaae91e2c4117d Mon Sep 17 00:00:00 2001 From: Valentin Clement Date: Wed, 8 Feb 2023 10:29:41 +0100 Subject: [PATCH] [flang] Add a proper TODO for polymorphic array lowering with vector subscript Creation of polymorphic array temporary cannot be done inlined. Add a TODO so the current code exit in a clean way when lowering reach it. A solution involving the runtime will be put in place. Depends on D143490 Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D143491 --- flang/lib/Lower/ConvertExpr.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/flang/lib/Lower/ConvertExpr.cpp b/flang/lib/Lower/ConvertExpr.cpp index e4ccddc..90de4b8 100644 --- a/flang/lib/Lower/ConvertExpr.cpp +++ b/flang/lib/Lower/ConvertExpr.cpp @@ -3785,6 +3785,12 @@ private: /// Lower rhs of an array expression. ExtValue lowerArrayExpression(const Fortran::lower::SomeExpr &exp) { mlir::Type resTy = converter.genType(exp); + + if (fir::isPolymorphicType(resTy) && + Fortran::evaluate::HasVectorSubscript(exp)) + TODO(getLoc(), + "polymorphic array expression lowering with vector subscript"); + return std::visit( [&](const auto &e) { return lowerArrayExpression(genarr(e), resTy); }, exp.u); -- 2.7.4