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
/// 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);