diff --git a/flang/lib/Lower/Allocatable.cpp b/flang/lib/Lower/Allocatable.cpp index a4e3850d8f2d1..b774c962bf27c 100644 --- a/flang/lib/Lower/Allocatable.cpp +++ b/flang/lib/Lower/Allocatable.cpp @@ -438,8 +438,6 @@ 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()) @@ -560,6 +558,8 @@ class AllocateStmtHelper { genAllocateObjectInit(box); if (alloc.hasCoarraySpec()) TODO(loc, "coarray allocation"); + if (alloc.getShapeSpecs().size() > 0 && sourceExv.rank() == 0) + TODO(loc, "allocate array object with scalar SOURCE specifier"); // Set length of the allocate object if it has. Otherwise, get the length // from source for the deferred length parameter. if (lenParams.empty() && box.isCharacter() &&