Skip to content

Commit 8b3c071

Browse files
committed
[Flang][OpenMP] Small fix to handle CharBoxValue types for implicit target maps
Original commit: fbaf2c6 Original PR: #67164
1 parent 30414fc commit 8b3c071

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

flang/lib/Lower/OpenMP.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2527,12 +2527,13 @@ static void genBodyOfTargetOp(
25272527
[&](const fir::CharArrayBoxValue &v) {
25282528
converter.bindSymbol(
25292529
*sym,
2530-
fir::CharArrayBoxValue(arg, v.getLen(),
2530+
fir::CharArrayBoxValue(arg, extractBoundArgs(1).front(),
25312531
extractBoundArgs(v.getExtents().size()),
25322532
extractBoundArgs(v.getLBounds().size())));
25332533
},
25342534
[&](const fir::CharBoxValue &v) {
2535-
converter.bindSymbol(*sym, fir::CharBoxValue(arg, v.getLen()));
2535+
converter.bindSymbol(
2536+
*sym, fir::CharBoxValue(arg, extractBoundArgs(1).front()));
25362537
},
25372538
[&](const fir::UnboxedValue &v) { converter.bindSymbol(*sym, arg); },
25382539
[&](const auto &) {
@@ -2696,9 +2697,17 @@ genTargetOp(Fortran::lower::AbstractConverter &converter,
26962697
addMapInfoForBounds(v.getLBounds());
26972698
},
26982699
[&](const fir::CharArrayBoxValue &v) {
2700+
llvm::SmallVector<mlir::Value> len;
2701+
len.push_back(v.getLen());
2702+
addMapInfoForBounds(len);
26992703
addMapInfoForBounds(v.getExtents());
27002704
addMapInfoForBounds(v.getLBounds());
27012705
},
2706+
[&](const fir::CharBoxValue &v) {
2707+
llvm::SmallVector<mlir::Value> len;
2708+
len.push_back(v.getLen());
2709+
addMapInfoForBounds(len);
2710+
},
27022711
[&](const auto &) {
27032712
// Nothing to do for non-box values.
27042713
});

0 commit comments

Comments
 (0)