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

via flang-commits flang-commits at lists.llvm.org
Sun Feb 4 10:52:06 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())
----------------
NimishMishra wrote:

Thanks @luporl for the review. Yes, the understanding is correct. Since each nested region needs to handle the symbols separately, we needed to make `collectSymbols` as it is now. In fact, in response to Kiran's comment above, I have given the lowered IR for combinations of nested constructs with default clause. You could check if you are ok with the current behaviour.

And sure, I'll capture more details on `collectSymbols` with this PR.

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


More information about the flang-commits mailing list