[flang] Add TODO for allocate array with scalar source
authorPeixin Qiao <qiaopeixin@huawei.com>
Wed, 18 Jan 2023 13:49:22 +0000 (21:49 +0800)
committerPeixin Qiao <qiaopeixin@huawei.com>
Wed, 18 Jan 2023 13:49:22 +0000 (21:49 +0800)
This scenario is not supported yet.

Reviewed By: clementval, jeanPerier, sscalpone

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

flang/lib/Lower/Allocatable.cpp

index 2587544..a4e3850 100644 (file)
@@ -438,6 +438,8 @@ private:
     // Generate a sequence of runtime calls.
     errorManager.genStatCheck(builder, loc);
     genAllocateObjectInit(box);
+    if (alloc.getShapeSpecs().size() > 0 && sourceExv.rank() == 0)
+      TODO(loc, "allocate array object with scalar SOURCE specifier");
     if (alloc.hasCoarraySpec())
       TODO(loc, "coarray allocation");
     if (alloc.type.IsPolymorphic())