[flang-commits] [flang] [Flang][OpenMP] Allow copyprivate and nowait on the directive clauses (PR #127769)

Thirumalai Shaktivel via flang-commits flang-commits at lists.llvm.org
Fri Feb 28 03:41:52 PST 2025


Thirumalai-Shaktivel wrote:

@mjklemm, I made the required changes, I have added some more testcases, do you see anything missing there.
Also, I have a doubt, consider an example:
```fortran
program single
    !$omp single nowait
        print *, x
    !$omp end single copyprivate(x, y) nowait
end program
```
Error:
```console
$ flang x.f90 -fopenmp
flang-21: warning: OpenMP support in flang is still experimental [-Wexperimental-option]
error: Semantic errors in x.f90
./x.f90:2:18: error: NOWAIT clause must not be used with COPYPRIVATE clause on the SINGLE directive
      !$omp single nowait
                   ^^^^^^
./x.f90:4:40: warning: NOWAIT clause is already used on the SINGLE directive
      !$omp end single copyprivate(x, y) nowait
                                         ^^^^^^
```
Is the error and the warning correct?

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


More information about the flang-commits mailing list