]> git.ipfire.org Git - thirdparty/gcc.git/commit
openmp: Add support for OpenMP 5.1 structured-block-sequences
authorJakub Jelinek <jakub@redhat.com>
Sat, 9 Oct 2021 08:14:36 +0000 (10:14 +0200)
committerJakub Jelinek <jakub@redhat.com>
Sat, 9 Oct 2021 08:14:36 +0000 (10:14 +0200)
commit875124eb0822d8905d73bd30d51421ba8afde282
treea6e08723492dd20513002f469b2e3dd969ad2644
parent0d788c358b94d0e1983e0c6bf6269fa105b6d007
openmp: Add support for OpenMP 5.1 structured-block-sequences

Related to this is the addition of structured-block-sequence in OpenMP 5.1,
which doesn't change anything for Fortran, but for C/C++ allows multiple
statements instead of just one possibly compound around the separating
directives (section and scan).

I've also made some updates to the OpenMP 5.1 support list in libgomp.texi.

2021-10-09  Jakub Jelinek  <jakub@redhat.com>

gcc/c/
* c-parser.c (c_parser_omp_structured_block_sequence): New function.
(c_parser_omp_scan_loop_body): Use it.
(c_parser_omp_sections_scope): Likewise.
gcc/cp/
* parser.c (cp_parser_omp_structured_block): Remove disallow_omp_attrs
argument.
(cp_parser_omp_structured_block_sequence): New function.
(cp_parser_omp_scan_loop_body): Use it.
(cp_parser_omp_sections_scope): Likewise.
gcc/testsuite/
* c-c++-common/gomp/sections1.c (foo): Don't expect errors on
multiple statements in between section directive(s).  Add testcases
for invalid no statements in between section directive(s).
* gcc.dg/gomp/sections-2.c (foo): Don't expect errors on
multiple statements in between section directive(s).
* g++.dg/gomp/sections-2.C (foo): Likewise.
* g++.dg/gomp/attrs-6.C (foo): Add testcases for multiple
statements in between section directive(s).
(bar): Add testcases for multiple statements in between scan
directive.
* g++.dg/gomp/attrs-7.C (bar): Adjust expected error recovery.
libgomp/
* libgomp.texi (OpenMP 5.1): Mention implemented support for
structured block sequences in C/C++.  Mention support for
unconstrained/reproducible modifiers on order clause.
Mention partial (C/C++ only) support of extentensions to atomics
construct.  Mention partial (C/C++ on clause only) support of
align/allocator modifiers on allocate clause.
gcc/c/c-parser.c
gcc/cp/parser.c
gcc/testsuite/c-c++-common/gomp/sections1.c
gcc/testsuite/g++.dg/gomp/attrs-6.C
gcc/testsuite/g++.dg/gomp/attrs-7.C
gcc/testsuite/g++.dg/gomp/sections-2.C
gcc/testsuite/gcc.dg/gomp/sections-2.c
libgomp/libgomp.texi