]> git.feebdaed.xyz Git - 0xmirror/gcc.git/commit
OpenMP: uses_allocators with ';'-separated list
authorTobias Burnus <tburnus@baylibre.com>
Fri, 19 Dec 2025 11:07:58 +0000 (12:07 +0100)
committerTobias Burnus <tburnus@baylibre.com>
Fri, 19 Dec 2025 11:07:58 +0000 (12:07 +0100)
commit7044071f07d763444247e32f9db25d7a658b7f9e
tree7d0441cc209cd89c57c9be6786c8051598bb2bd5
parent8a6d371add9eac51b72f7a9d753ec91502c37d5a
OpenMP: uses_allocators with ';'-separated list

OpenMP 6.0 has the following wording for the uses_allocators clause:
"More than one clause-argument-specification may be specified";
this permits ';' lists. While that's pointless for predefined
allocators, for user-defined allocators it saves redundant
') uses_allocators(' by permitting:
  uses_allocators( traits(t1): alloc1 ; traits(t2): alloc2 )

Additionally, the order in the tree dump has been changed to
place the modifiers before the allocator variable, matching
the input syntax.

gcc/c/ChangeLog:

* c-parser.cc (c_parser_omp_clause_uses_allocators): Accept
multiple clause-argument-specifications separated by ';'.

gcc/cp/ChangeLog:

* parser.cc (cp_parser_omp_clause_uses_allocators): Accept
multiple clause-argument-specifications separated by ';'.

gcc/fortran/ChangeLog:

* openmp.cc (gfc_match_omp_clause_uses_allocators): Accept
multiple clause-argument-specifications separated by ';'.

gcc/ChangeLog:

* tree-pretty-print.cc (dump_omp_clause): For uses_allocators,
print modifier before allocator variable.

libgomp/ChangeLog:

* testsuite/libgomp.fortran/uses_allocators-7.f90: Add ';' test.

gcc/testsuite/ChangeLog:

* c-c++-common/gomp/uses_allocators-8.c: New test.
gcc/c/c-parser.cc
gcc/cp/parser.cc
gcc/fortran/openmp.cc
gcc/testsuite/c-c++-common/gomp/uses_allocators-8.c [new file with mode: 0644]
gcc/tree-pretty-print.cc
libgomp/testsuite/libgomp.fortran/uses_allocators-7.f90