[flang-commits] [flang] 39e6bd9 - [flang] Add a proper TODO for polymorphic array lowering with vector subscript

Valentin Clement via flang-commits flang-commits at lists.llvm.org
Wed Feb 8 01:30:49 PST 2023


Author: Valentin Clement
Date: 2023-02-08T10:30:39+01:00
New Revision: 39e6bd9cac68bf40adca80029ffaae91e2c4117d

URL: https://github.com/llvm/llvm-project/commit/39e6bd9cac68bf40adca80029ffaae91e2c4117d
DIFF: https://github.com/llvm/llvm-project/commit/39e6bd9cac68bf40adca80029ffaae91e2c4117d.diff

LOG: [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

Added: 
    

Modified: 
    flang/lib/Lower/ConvertExpr.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Lower/ConvertExpr.cpp b/flang/lib/Lower/ConvertExpr.cpp
index e4ccddc84f1c..90de4b83216d 100644
--- a/flang/lib/Lower/ConvertExpr.cpp
+++ b/flang/lib/Lower/ConvertExpr.cpp
@@ -3785,6 +3785,12 @@ class ArrayExprLowering {
   /// 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);


        


More information about the flang-commits mailing list