[flang-commits] [flang] 42f957f - [flang] Add TODO when trying to do a polymorphic temp in getTempExtAddr

Valentin Clement via flang-commits flang-commits at lists.llvm.org
Tue Feb 21 04:24:13 PST 2023


Author: Valentin Clement
Date: 2023-02-21T13:24:06+01:00
New Revision: 42f957f55d3bff4eeb8d05c247fce61323679175

URL: https://github.com/llvm/llvm-project/commit/42f957f55d3bff4eeb8d05c247fce61323679175
DIFF: https://github.com/llvm/llvm-project/commit/42f957f55d3bff4eeb8d05c247fce61323679175.diff

LOG: [flang] Add TODO when trying to do a polymorphic temp in getTempExtAddr

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D144459

Added: 
    

Modified: 
    flang/lib/Lower/ConvertExpr.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Lower/ConvertExpr.cpp b/flang/lib/Lower/ConvertExpr.cpp
index 78fa89cbd211f..1407b5ea81f73 100644
--- a/flang/lib/Lower/ConvertExpr.cpp
+++ b/flang/lib/Lower/ConvertExpr.cpp
@@ -2021,6 +2021,8 @@ class ScalarExprLowering {
         },
         [&](const fir::BoxValue &x) -> ExtValue {
           // Derived type scalar that may be polymorphic.
+          if (fir::isPolymorphicType(fir::getBase(x).getType()))
+            TODO(loc, "polymorphic array temporary");
           assert(!x.hasRank() && x.isDerived());
           if (x.isDerivedWithLenParameters())
             fir::emitFatalError(


        


More information about the flang-commits mailing list