[flang] Add TODO when trying to do a polymorphic temp in getTempExtAddr
authorValentin Clement <clementval@gmail.com>
Tue, 21 Feb 2023 12:23:44 +0000 (13:23 +0100)
committerValentin Clement <clementval@gmail.com>
Tue, 21 Feb 2023 12:24:06 +0000 (13:24 +0100)
Reviewed By: jeanPerier

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

flang/lib/Lower/ConvertExpr.cpp

index 78fa89c..1407b5e 100644 (file)
@@ -2021,6 +2021,8 @@ public:
         },
         [&](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(