@@ -2527,12 +2527,13 @@ static void genBodyOfTargetOp(
2527
2527
[&](const fir::CharArrayBoxValue &v) {
2528
2528
converter.bindSymbol (
2529
2529
*sym,
2530
- fir::CharArrayBoxValue (arg, v. getLen (),
2530
+ fir::CharArrayBoxValue (arg, extractBoundArgs ( 1 ). front (),
2531
2531
extractBoundArgs (v.getExtents ().size ()),
2532
2532
extractBoundArgs (v.getLBounds ().size ())));
2533
2533
},
2534
2534
[&](const fir::CharBoxValue &v) {
2535
- converter.bindSymbol (*sym, fir::CharBoxValue (arg, v.getLen ()));
2535
+ converter.bindSymbol (
2536
+ *sym, fir::CharBoxValue (arg, extractBoundArgs (1 ).front ()));
2536
2537
},
2537
2538
[&](const fir::UnboxedValue &v) { converter.bindSymbol (*sym, arg); },
2538
2539
[&](const auto &) {
@@ -2696,9 +2697,17 @@ genTargetOp(Fortran::lower::AbstractConverter &converter,
2696
2697
addMapInfoForBounds (v.getLBounds ());
2697
2698
},
2698
2699
[&](const fir::CharArrayBoxValue &v) {
2700
+ llvm::SmallVector<mlir::Value> len;
2701
+ len.push_back (v.getLen ());
2702
+ addMapInfoForBounds (len);
2699
2703
addMapInfoForBounds (v.getExtents ());
2700
2704
addMapInfoForBounds (v.getLBounds ());
2701
2705
},
2706
+ [&](const fir::CharBoxValue &v) {
2707
+ llvm::SmallVector<mlir::Value> len;
2708
+ len.push_back (v.getLen ());
2709
+ addMapInfoForBounds (len);
2710
+ },
2702
2711
[&](const auto &) {
2703
2712
// Nothing to do for non-box values.
2704
2713
});
0 commit comments