[flang-commits] [clang] [flang] [llvm] [OpenMP] Add parser/semantic support for dyn_groupprivate clause (PR #152651)

Krzysztof Parzyszek via flang-commits flang-commits at lists.llvm.org
Tue Aug 19 05:27:21 PDT 2025


================
@@ -1104,6 +1107,7 @@ def OMP_Target : Directive<[Spelling<"target">]> {
   let allowedOnceClauses = [
     VersionedClause<OMPC_DefaultMap>,
     VersionedClause<OMPC_Device>,
+    VersionedClause<OMPC_DynGroupprivate>,
----------------
kparzysz wrote:

The current OpenMP spec does not show "unique" property for this clause, so it seems like it should be allowed to be present multiple times on a construct.  Since we've placed it in the "allowedOnceClauses", it will only be allowed once per construct, effectively enforcing the "unique" property.

If the clause has the unique property, then the restriction is redundant, since the "more than one dyn_groupprivate clause on a construct" cannot happen in the first place.


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


More information about the flang-commits mailing list