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

Leandro Lupori via flang-commits flang-commits at lists.llvm.org
Tue Apr 9 05:16:22 PDT 2024


luporl wrote:

> Have all the changes been made here @NimishMishra? If so can @luporl approve?

Besides some minor nitpicks, there is an issue remaining, that causes a regression in some specific cases, as when you have nested default clauses with `shared`, like the example below:

```
    !$omp parallel default(private)
        !$omp parallel default(firstprivate)
            x = y
        !$omp end parallel
        !$omp parallel default(private) shared(z)
            w = x + z
        !$omp end parallel
    !$omp end parallel 
```

In this case, `z` will end up being privatized in the inner parallel. https://github.com/llvm/llvm-project/pull/85989 fixes this.
I think it would be better to move that fix to this patch. But if we assume that https://github.com/llvm/llvm-project/pull/85989 is going to be merged soon and you are also ok with this, then this can be approved as is.

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


More information about the flang-commits mailing list