]> git.ipfire.org Git - thirdparty/gcc.git/commit
OpenMP/Fortran: Permit end-clause on directive
authorTobias Burnus <tobias@codesourcery.com>
Mon, 28 Nov 2022 14:20:36 +0000 (15:20 +0100)
committerTobias Burnus <tobias@codesourcery.com>
Mon, 28 Nov 2022 14:20:36 +0000 (15:20 +0100)
commit519f647c57f1c56b4d333949a9786395bf48295f
treea10549217043d6d03dde5298dfc4b34f1b99e396
parent97c07e0b841ac919c5eb6f4b8c335ede1f32de78
OpenMP/Fortran: Permit end-clause on directive

gcc/fortran/ChangeLog:

* openmp.cc (OMP_DO_CLAUSES, OMP_SCOPE_CLAUSES,
OMP_SECTIONS_CLAUSES): Add 'nowait'.
(OMP_SINGLE_CLAUSES): Add 'nowait' and 'copyprivate'.
(gfc_match_omp_distribute_parallel_do,
gfc_match_omp_distribute_parallel_do_simd,
gfc_match_omp_parallel_do,
gfc_match_omp_parallel_do_simd,
gfc_match_omp_parallel_sections,
gfc_match_omp_teams_distribute_parallel_do,
gfc_match_omp_teams_distribute_parallel_do_simd): Disallow 'nowait'.
(gfc_match_omp_workshare): Match 'nowait' clause.
(gfc_match_omp_end_single): Use clause matcher for 'nowait'.
(resolve_omp_clauses): Reject 'nowait' + 'copyprivate'.
* parse.cc (decode_omp_directive): Break too long line.
(parse_omp_do, parse_omp_structured_block): Diagnose duplicated
'nowait' clause.

libgomp/ChangeLog:

* libgomp.texi (OpenMP 5.2): Mark end-directive as Y.

gcc/testsuite/ChangeLog:

* gfortran.dg/gomp/copyprivate-1.f90: New test.
* gfortran.dg/gomp/copyprivate-2.f90: New test.
* gfortran.dg/gomp/nowait-2.f90: Move dg-error tests ...
* gfortran.dg/gomp/nowait-4.f90: ... to this new file.
* gfortran.dg/gomp/nowait-5.f90: New test.
* gfortran.dg/gomp/nowait-6.f90: New test.
* gfortran.dg/gomp/nowait-7.f90: New test.
* gfortran.dg/gomp/nowait-8.f90: New test.

(cherry picked from commit 091b6dbc48177fa3ef15d62ea280ef6cb61c05b2)
14 files changed:
gcc/fortran/ChangeLog.omp
gcc/fortran/openmp.cc
gcc/fortran/parse.cc
gcc/testsuite/ChangeLog.omp
gcc/testsuite/gfortran.dg/gomp/copyprivate-1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/gomp/copyprivate-2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/gomp/nowait-2.f90
gcc/testsuite/gfortran.dg/gomp/nowait-4.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/gomp/nowait-5.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/gomp/nowait-6.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/gomp/nowait-7.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/gomp/nowait-8.f90 [new file with mode: 0644]
libgomp/ChangeLog.omp
libgomp/libgomp.texi