File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2197,10 +2197,12 @@ static void genBodyOfTargetDataOp(
2197
2197
if (fir::isa_builtin_cptr_type (refType.getElementType ())) {
2198
2198
converter.bindSymbol (*argSymbol, arg);
2199
2199
} else {
2200
+ // Avoid capture of a reference to a structured binding.
2201
+ const Fortran::semantics::Symbol *sym = argSymbol;
2200
2202
extVal.match (
2201
2203
[&](const fir::MutableBoxValue &mbv) {
2202
2204
converter.bindSymbol (
2203
- *argSymbol ,
2205
+ *sym ,
2204
2206
fir::MutableBoxValue (
2205
2207
arg, fir::factory::getNonDeferredLenParams (extVal), {}));
2206
2208
},
@@ -2489,7 +2491,7 @@ static void genBodyOfTargetOp(
2489
2491
// Bind the symbols to their corresponding block arguments.
2490
2492
for (auto [argIndex, argSymbol] : llvm::enumerate (mapSymbols)) {
2491
2493
const mlir::BlockArgument &arg = region.getArgument (argIndex);
2492
- // Avoid capture of reference to a structured binding.
2494
+ // Avoid capture of a reference to a structured binding.
2493
2495
const Fortran::semantics::Symbol *sym = argSymbol;
2494
2496
fir::ExtendedValue extVal = converter.getSymbolExtendedValue (*sym);
2495
2497
extVal.match (
You can’t perform that action at this time.
0 commit comments