[flang-commits] [flang] [FLANG] Solving issue with adjustr intrinsic in where construct (PR #146851)
Slava Zakharin via flang-commits
flang-commits at lists.llvm.org
Mon Aug 18 11:54:22 PDT 2025
================
@@ -445,8 +445,16 @@ struct AssociateOpConversion
!mlir::isa<fir::BaseBoxType>(assocType)) ||
((mlir::isa<fir::BoxCharType>(sourceVar.getType()) &&
!mlir::isa<fir::BoxCharType>(assocType)))) {
- sourceVar =
- fir::BoxAddrOp::create(builder, loc, assocType, sourceVar);
+ sourceVar = builder.create<fir::BoxAddrOp>(loc, assocType, sourceVar);
+ } else if (mlir::isa<fir::ReferenceType>(sourceVar.getType()) &&
+ mlir::isa<fir::BoxCharType>(assocType)) {
+ mlir::Value lenVal = associate.getTypeparams()[0];
----------------
vzakhari wrote:
nit: please assert that `getTypeparams()` returns a vector of length one.
https://github.com/llvm/llvm-project/pull/146851
More information about the flang-commits
mailing list