]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran/openmp: Fix '!$omp end'
authorTobias Burnus <tobias@codesourcery.com>
Fri, 12 Nov 2021 16:58:21 +0000 (17:58 +0100)
committerTobias Burnus <tobias@codesourcery.com>
Fri, 12 Nov 2021 16:58:21 +0000 (17:58 +0100)
commit48c6cac9caea1dc7c5f50ad3a736f6693e74a11b
tree02647c63a8ab3cf80e11a645a15ca6b5376cb8fb
parent82de09ab17cd3876134d46ad7a6d2c32235bf8f5
Fortran/openmp: Fix '!$omp end'

gcc/fortran/ChangeLog:

* parse.c (decode_omp_directive): Fix permitting 'nowait' for some
combined directives, add missing 'omp end ... loop'.
(gfc_ascii_statement): Fix ST_OMP_END_TEAMS_LOOP result.
* openmp.c (resolve_omp_clauses): Add missing combined loop constructs
case values to the 'if(directive-name: ...)' check.
* trans-openmp.c (gfc_split_omp_clauses): Put nowait on target if
first leaf construct accepting it.

gcc/testsuite/ChangeLog:

* gfortran.dg/gomp/unexpected-end.f90: Update dg-error.
* gfortran.dg/gomp/clauses-1.f90: New test.
* gfortran.dg/gomp/nowait-2.f90: New test.
* gfortran.dg/gomp/nowait-3.f90: New test.
gcc/fortran/openmp.c
gcc/fortran/parse.c
gcc/fortran/trans-openmp.c
gcc/testsuite/gfortran.dg/gomp/clauses-1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/gomp/nowait-2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/gomp/nowait-3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/gomp/unexpected-end.f90