[flang-commits] [flang] [flang][OpenMP] Support user-defined declare reduction with derived types (PR #184897)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Tue Mar 24 04:22:03 PDT 2026
================
@@ -3860,13 +3852,55 @@ static ReductionProcessor::GenCombinerCBTy processReductionCombiner(
symTable.addVariableDefinition(*object.sym(), declareOp);
}
+ // For derived types with a typed assignment available, use
+ // hlfir::AssignOp or user-defined assignment directly instead of
+ // trying to convert the expression to a value (which doesn't work
+ // for record types). Only take this path when the assignment RHS
----------------
tblah wrote:
Would this mean that we need to use hlfir::AssignOp instead of store for the component updates in case the component is itself a record type?
IIRC if we use AssignOp where it can just be a store, it will get lowered to a fir.store when HLFIR is converted into FIR anyway.
https://github.com/llvm/llvm-project/pull/184897
More information about the flang-commits
mailing list