[flang-commits] [flang] [flang][OpenMP] Fix construct privatization in default clause (PR #72510)

Leandro Lupori via flang-commits flang-commits at lists.llvm.org
Mon Feb 5 12:16:17 PST 2024


================
@@ -426,14 +425,10 @@ void DataSharingProcessor::collectSymbols(
                              /*collectSymbols=*/true,
                              /*collectHostAssociatedSymbols=*/true);
   for (Fortran::lower::pft::Evaluation &e : eval.getNestedEvaluations()) {
-    if (e.hasNestedEvaluations())
+    if (e.hasNestedEvaluations() && !e.isConstruct())
----------------
luporl wrote:

Thanks for the explanation @NimishMishra. The current behavior seems ok to me.
I'm planning to use `collectSymbols` to handle symbols with implicit DSA, such as those of `task`, that must be `firstprivate` if no `default` clause is present (and outer context doesn't define it as shared).

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


More information about the flang-commits mailing list