[flang-commits] [flang] [FLANG] Solving issue with adjustr intrinsic in where construct (PR #146851)
via flang-commits
flang-commits at lists.llvm.org
Mon Aug 18 05:15:42 PDT 2025
================
@@ -446,6 +446,16 @@ struct AssociateOpConversion
((mlir::isa<fir::BoxCharType>(sourceVar.getType()) &&
!mlir::isa<fir::BoxCharType>(assocType)))) {
sourceVar = builder.create<fir::BoxAddrOp>(loc, assocType, sourceVar);
+ } else if (mlir::isa<fir::ReferenceType>(sourceVar.getType()) &&
+ mlir::isa<fir::BoxCharType>(assocType)) {
+ auto refTy = mlir::cast<fir::ReferenceType>(sourceVar.getType());
+ auto charTy = mlir::dyn_cast<fir::CharacterType>(refTy.getEleTy());
----------------
EbinJose2002 wrote:
Sorry for the delayed reply.
I have made the change to access the length from associate instruction itself.
https://github.com/llvm/llvm-project/pull/146851
More information about the flang-commits
mailing list