Skip to content

Commit 39e6bd9

Browse files
committed
[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
1 parent 1e413b9 commit 39e6bd9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

flang/lib/Lower/ConvertExpr.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3785,6 +3785,12 @@ class ArrayExprLowering {
37853785
/// Lower rhs of an array expression.
37863786
ExtValue lowerArrayExpression(const Fortran::lower::SomeExpr &exp) {
37873787
mlir::Type resTy = converter.genType(exp);
3788+
3789+
if (fir::isPolymorphicType(resTy) &&
3790+
Fortran::evaluate::HasVectorSubscript(exp))
3791+
TODO(getLoc(),
3792+
"polymorphic array expression lowering with vector subscript");
3793+
37883794
return std::visit(
37893795
[&](const auto &e) { return lowerArrayExpression(genarr(e), resTy); },
37903796
exp.u);

0 commit comments

Comments
 (0)