]> git.ipfire.org Git - thirdparty/gcc.git/commit
OpenMP: Add early C/C++ parser support for 'groupprivate' directive
authorTobias Burnus <tburnus@baylibre.com>
Wed, 7 Jan 2026 14:51:55 +0000 (15:51 +0100)
committerTobias Burnus <tburnus@baylibre.com>
Wed, 7 Jan 2026 14:51:55 +0000 (15:51 +0100)
commit827cd76fa7751f89cc2b1c6ad26da24cdc705131
treeb22ec9c386310b5e1b5d1e7026306abbb82efa95
parent849b8f250c6e2a441c46ef1c6fcab7041cd25e03
OpenMP: Add early C/C++ parser support for 'groupprivate' directive

After parsing the directive, 'sorry, unimplemented' is printed.
Note that restriction checks still have to be implemented, but this
depends on parser support for the 'local' clause of 'omp declare target',
which still has to be implemented.

gcc/c-family/ChangeLog:

* c-omp.cc (c_omp_directives): Uncomment 'groupprivate'.
* c-pragma.cc (omp_pragmas): Add PRAGMA_OMP_GROUPPRIVATE.
* c-pragma.h (enum pragma_kind): Likewise.

gcc/c/ChangeLog:

* c-parser.cc (OMP_GROUPPRIVATE_CLAUSE_MASK,
c_parser_omp_groupprivate): New.
(c_parser_pragma): Call it.
(c_maybe_parse_omp_decl): Uncomment PRAGMA_OMP_GROUPPRIVATE
check.

gcc/cp/ChangeLog:

* parser.cc (OMP_GROUPPRIVATE_CLAUSE_MASK,
cp_parser_omp_groupprivate): New.
(cp_parser_pragma): Call it.
(cp_maybe_parse_omp_decl): Uncomment PRAGMA_OMP_GROUPPRIVATE
check.

gcc/testsuite/ChangeLog:

* c-c++-common/gomp/groupprivate-1.c: New test.
gcc/c-family/c-omp.cc
gcc/c-family/c-pragma.cc
gcc/c-family/c-pragma.h
gcc/c/c-parser.cc
gcc/cp/parser.cc
gcc/testsuite/c-c++-common/gomp/groupprivate-1.c [new file with mode: 0644]