[flang-commits] [flang] [flang][openmp]Add UserReductionDetails and use in DECLARE REDUCTION (PR #140066)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Wed Jun 4 07:55:28 PDT 2025
================
@@ -3508,6 +3509,17 @@ bool OmpStructureChecker::CheckReductionOperator(
break;
}
}
+ // User-defined operators are OK if there has been a declared reduction
+ // for that. We mangle those names to store the user details.
+ if (const auto *definedOp{std::get_if<parser::DefinedOpName>(&dOpr.u)}) {
+ std::string mangled = MangleDefinedOperator(definedOp->v.symbol->name());
+ const Scope &scope = definedOp->v.symbol->owner();
+ if (const Symbol *symbol = scope.FindSymbol(mangled)) {
----------------
tblah wrote:
https://github.com/llvm/llvm-project/pull/140066/commits/693112efb87380439f2ac8a6e6e0e230136d9a54
https://github.com/llvm/llvm-project/pull/140066
More information about the flang-commits
mailing list