[flang-commits] [flang] [flang][openmp]Add UserReductionDetails and use in DECLARE REDUCTION (PR #131628)

Mats Petersson via flang-commits flang-commits at lists.llvm.org
Tue Mar 25 12:22:16 PDT 2025


================
@@ -1798,6 +1862,13 @@ void OmpVisitor::ProcessReductionSpecifier(
     Walk(clauses);
     PopScope();
   }
+
+  if (name) {
+    if (!symbol) {
+      symbol = &MakeSymbol(mangledName, Attrs{}, std::move(*reductionDetails));
+    }
+    name->symbol = symbol;
----------------
Leporacanthicus wrote:

I'm adding a new test for dupliocate symbols. There is one, but I think we need another different one.

And yes, we need to set the symbol on the original name, even if the actual name is not matching, so updating the symbol is required. If not, another portion finds the name and says it's not been resolved. 

https://github.com/llvm/llvm-project/pull/131628


More information about the flang-commits mailing list