[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
Sat Mar 1 05:01:33 PST 2025
Thirumalai-Shaktivel wrote:
Thanks for the review!
> I think this is a bug. I do not see any restriction in the OpenMP specification that would disallow NOWAIT when COPYPRIVATE is present.
Maybe I think I need to fix the error message there.
Here is the restriction from OpenMP 5.2: 11.1 single Construct, which says "The copyprivate clause must not be used with the nowait clause". But this restriction is removed in OpenMP 6.0.
I actually altered the previous error message, it used to throw the following:
```console
error: Semantic errors in <source>
<source>:7:7: error: Clause NOWAIT is not allowed if clause COPYPRIVATE appears on the END SINGLE directive
!$omp end single copyprivate(x) nowait
^^^^^^^^^^
```
Let me know, what needs to be done here.
> However, the compiler should produce an error that you have NOWAIT at both the begin and end directive. Only for the COPYPRIVATE clause the diagnostic should be a warning. I consider NOWAIT at both directives an actual error, because NOWAIT is a unique clause as per [5.2:308:10].
This seems right, I will make the required changes soon.
https://github.com/llvm/llvm-project/pull/127769
More information about the flang-commits
mailing list