File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
flang/lib/Optimizer/OpenMP Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -542,7 +542,9 @@ class MapInfoFinalizationPass
542
542
// iterations from previous function scopes.
543
543
localBoxAllocas.clear ();
544
544
545
- // First, walk `omp.map.info` ops to see if any
545
+ // First, walk `omp.map.info` ops to see if any of them have varPtrs
546
+ // with an underlying type of fir.char<k, ?>, i.e a character
547
+ // with dynamic length. If so, check if they need bounds added.
546
548
func->walk ([&](mlir::omp::MapInfoOp op) {
547
549
mlir::Value varPtr = op.getVarPtr ();
548
550
mlir::Type underlyingVarType = fir::unwrapRefType (varPtr.getType ());
@@ -554,6 +556,8 @@ class MapInfoFinalizationPass
554
556
if (!cType.hasDynamicLen ())
555
557
return mlir::WalkResult::advance ();
556
558
559
+ if (!op.getBounds ().empty ())
560
+ return mlir::WalkResult::advance ();
557
561
// This means varPtr is a BlockArgument. I do not know how to get to a
558
562
// fir.boxchar<> type of mlir::Value for varPtr. So, skipping this for
559
563
// now.
You can’t perform that action at this time.
0 commit comments