[flang-commits] [flang] [flang][hlfir] Fixed some finalization/deallocation issues. (PR #67047)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Fri Sep 22 03:10:00 PDT 2023
================
@@ -1237,10 +1237,28 @@ void hlfir::AssociateOp::build(mlir::OpBuilder &builder,
void hlfir::EndAssociateOp::build(mlir::OpBuilder &builder,
mlir::OperationState &result,
hlfir::AssociateOp associate) {
- return build(builder, result, associate.getFirBase(),
+ mlir::Value hlfirBase = associate.getBase();
+ mlir::Value firBase = associate.getFirBase();
+ // If EndAssociateOp may need to initiate the deallocation
+ // of allocatable components, it has to have access to the variable
+ // definition, so we cannot use the FIR base as the operand.
----------------
tblah wrote:
nit: couldn't we always use the hlfir base?
https://github.com/llvm/llvm-project/pull/67047
More information about the flang-commits
mailing list