[flang-commits] [PATCH] D134440: [flang] Add TODOs for some FORALL assignments with Pointers and Allocatables
Jean Perier via Phabricator via flang-commits
flang-commits at lists.llvm.org
Fri Sep 23 01:12:55 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2502c3afe0be: [flang] Add TODOs for some FORALL assignments with Pointers and Allocatables (authored by jeanPerier).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134440/new/
https://reviews.llvm.org/D134440
Files:
flang/lib/Lower/ConvertExpr.cpp
Index: flang/lib/Lower/ConvertExpr.cpp
===================================================================
--- flang/lib/Lower/ConvertExpr.cpp
+++ flang/lib/Lower/ConvertExpr.cpp
@@ -3856,6 +3856,9 @@
// FIXME: If the lhs is in an explicit iteration space, the assignment may
// be to an array of allocatable arrays rather than a single allocatable
// array.
+ if (explicitSpaceIsActive() && lhs.Rank() > 0)
+ TODO(loc, "assignment to whole allocatable array inside FORALL");
+
fir::MutableBoxValue mutableBox =
Fortran::lower::createMutableBox(loc, converter, lhs, symMap);
if (rhs.Rank() > 0)
@@ -7174,7 +7177,9 @@
if (components.hasExtendCoorRef()) {
auto eleBoxTy =
fir::applyPathToType(innerArg.getType(), iters.iterVec());
- assert(eleBoxTy && eleBoxTy.isa<fir::BoxType>());
+ if (!eleBoxTy || !eleBoxTy.isa<fir::BoxType>())
+ TODO(loc, "assignment in a FORALL involving a designator with a "
+ "POINTER or ALLOCATABLE component part-ref");
auto arrayOp = builder.create<fir::ArrayAccessOp>(
loc, builder.getRefType(eleBoxTy), innerArg, iters.iterVec(),
fir::factory::getTypeParams(loc, builder, load));
@@ -7245,7 +7250,9 @@
}
if (components.hasExtendCoorRef()) {
auto eleBoxTy = fir::applyPathToType(load.getType(), iters.iterVec());
- assert(eleBoxTy && eleBoxTy.isa<fir::BoxType>());
+ if (!eleBoxTy || !eleBoxTy.isa<fir::BoxType>())
+ TODO(loc, "assignment in a FORALL involving a designator with a "
+ "POINTER or ALLOCATABLE component part-ref");
auto access = builder.create<fir::ArrayAccessOp>(
loc, builder.getRefType(eleBoxTy), load, iters.iterVec(),
fir::factory::getTypeParams(loc, builder, load));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134440.462416.patch
Type: text/x-patch
Size: 1886 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220923/c6fe3e37/attachment.bin>
More information about the flang-commits
mailing list