diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2021-11-12 17:58:21 +0100 |
---|---|---|
committer | Tobias Burnus <tobias@codesourcery.com> | 2021-11-12 17:58:21 +0100 |
commit | 48c6cac9caea1dc7c5f50ad3a736f6693e74a11b (patch) | |
tree | 02647c63a8ab3cf80e11a645a15ca6b5376cb8fb /gcc/fortran/trans-openmp.c | |
parent | 82de09ab17cd3876134d46ad7a6d2c32235bf8f5 (diff) | |
download | gcc-48c6cac9caea1dc7c5f50ad3a736f6693e74a11b.zip gcc-48c6cac9caea1dc7c5f50ad3a736f6693e74a11b.tar.gz gcc-48c6cac9caea1dc7c5f50ad3a736f6693e74a11b.tar.bz2 |
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.
Diffstat (limited to 'gcc/fortran/trans-openmp.c')
-rw-r--r-- | gcc/fortran/trans-openmp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c index 6bc7e9a..b86c7cf 100644 --- a/gcc/fortran/trans-openmp.c +++ b/gcc/fortran/trans-openmp.c @@ -5878,6 +5878,8 @@ gfc_split_omp_clauses (gfc_code *code, /* And this is copied to all. */ clausesa[GFC_OMP_SPLIT_TARGET].if_expr = code->ext.omp_clauses->if_expr; + clausesa[GFC_OMP_SPLIT_TARGET].nowait + = code->ext.omp_clauses->nowait; } if (mask & GFC_OMP_MASK_TEAMS) { |