diff options
author | Jakub Jelinek <jakub@redhat.com> | 2017-09-01 13:25:39 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2017-09-01 13:25:39 +0200 |
commit | d2e05fcbdafc26ab0c2babf2b3065d177f71305b (patch) | |
tree | cb173e95c3a681699e55211508d33bb13bbe064a /gcc/fortran/parse.c | |
parent | 39baa1d35e4f4157616abf6b1d8e0507e69cbfdc (diff) | |
download | gcc-d2e05fcbdafc26ab0c2babf2b3065d177f71305b.zip gcc-d2e05fcbdafc26ab0c2babf2b3065d177f71305b.tar.gz gcc-d2e05fcbdafc26ab0c2babf2b3065d177f71305b.tar.bz2 |
re PR c/81887 (pragma omp ordered simd ignored under -fopenmp-simd)
PR c/81887
c-family/
* c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
(omp_pragmas_simd): ... here.
* c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
create new clauses list containing just simd clause.
c/
* c-parser.c (c_parser_omp_ordered): Handle -fopenmp-simd.
cp/
* parser.c (cp_parser_omp_ordered): Handle -fopenmp-simd.
fortran/
* parse.c (decode_omp_directive): Use matchs instead of matcho for
end ordered and ordered directives, except for ordered depend. For
-fopenmp-simd and ordered depend, reject the stmt.
* trans-openmp.c (gfc_trans_omp_ordered): For -fopenmp-simd ignore
threads clause and if simd clause isn't present, just translate the
body.
testsuite/
* c-c++-common/gomp/pr81887.c: New test.
* gfortran.dg/gomp/pr81887.f90: New test.
From-SVN: r251585
Diffstat (limited to 'gcc/fortran/parse.c')
-rw-r--r-- | gcc/fortran/parse.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index 9ac50f0..e958e6d 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -875,7 +875,7 @@ decode_omp_directive (void) matcho ("end do", gfc_match_omp_end_nowait, ST_OMP_END_DO); matchs ("end simd", gfc_match_omp_eos, ST_OMP_END_SIMD); matcho ("end master", gfc_match_omp_eos, ST_OMP_END_MASTER); - matcho ("end ordered", gfc_match_omp_eos, ST_OMP_END_ORDERED); + matchs ("end ordered", gfc_match_omp_eos, ST_OMP_END_ORDERED); matchs ("end parallel do simd", gfc_match_omp_eos, ST_OMP_END_PARALLEL_DO_SIMD); matcho ("end parallel do", gfc_match_omp_eos, ST_OMP_END_PARALLEL_DO); @@ -929,14 +929,16 @@ decode_omp_directive (void) matcho ("master", gfc_match_omp_master, ST_OMP_MASTER); break; case 'o': - if (flag_openmp && gfc_match ("ordered depend (") == MATCH_YES) + if (gfc_match ("ordered depend (") == MATCH_YES) { gfc_current_locus = old_locus; + if (!flag_openmp) + break; matcho ("ordered", gfc_match_omp_ordered_depend, ST_OMP_ORDERED_DEPEND); } else - matcho ("ordered", gfc_match_omp_ordered, ST_OMP_ORDERED); + matchs ("ordered", gfc_match_omp_ordered, ST_OMP_ORDERED); break; case 'p': matchs ("parallel do simd", gfc_match_omp_parallel_do_simd, |