[flang-commits] [flang] 63ba34f - [flang] Add TODO for allocate array with scalar source

Peixin Qiao via flang-commits flang-commits at lists.llvm.org
Wed Jan 18 05:51:16 PST 2023


Author: Peixin Qiao
Date: 2023-01-18T21:49:22+08:00
New Revision: 63ba34f3fb752e0a60a78c21ee694e1064a870ab

URL: https://github.com/llvm/llvm-project/commit/63ba34f3fb752e0a60a78c21ee694e1064a870ab
DIFF: https://github.com/llvm/llvm-project/commit/63ba34f3fb752e0a60a78c21ee694e1064a870ab.diff

LOG: [flang] Add TODO for allocate array with scalar source

This scenario is not supported yet.

Reviewed By: clementval, jeanPerier, sscalpone

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

Added: 
    

Modified: 
    flang/lib/Lower/Allocatable.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Lower/Allocatable.cpp b/flang/lib/Lower/Allocatable.cpp
index 2587544637899..a4e3850d8f2d1 100644
--- a/flang/lib/Lower/Allocatable.cpp
+++ b/flang/lib/Lower/Allocatable.cpp
@@ -438,6 +438,8 @@ class AllocateStmtHelper {
     // 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())


        


More information about the flang-commits mailing list