Skip to content

Commit 8768516

Browse files
committed
Removed unnecessary handling of reference to boxchar conversion in BufferizeHLFIR.cpp
1 parent a9f9c7d commit 8768516

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flang/lib/Optimizer/HLFIR/Transforms/BufferizeHLFIR.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,9 +445,9 @@ struct AssociateOpConversion
445445
!mlir::isa<fir::BaseBoxType>(assocType)) ||
446446
((mlir::isa<fir::BoxCharType>(sourceVar.getType()) &&
447447
!mlir::isa<fir::BoxCharType>(assocType)))) {
448-
sourceVar =
449-
fir::BoxAddrOp::create(builder, loc, assocType, sourceVar);
450-
} else {
448+
sourceVar = builder.create<fir::BoxAddrOp>(loc, assocType, sourceVar);
449+
} else if (!mlir::isa<fir::ReferenceType>(sourceVar.getType()) ||
450+
!mlir::isa<fir::BoxCharType>(assocType)) {
451451
sourceVar = builder.createConvert(loc, assocType, sourceVar);
452452
}
453453
return sourceVar;

0 commit comments

Comments
 (0)