From d2e05fcbdafc26ab0c2babf2b3065d177f71305b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 1 Sep 2017 13:25:39 +0200 Subject: 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 --- gcc/c-family/c-pragma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/c-family/c-pragma.c') diff --git a/gcc/c-family/c-pragma.c b/gcc/c-family/c-pragma.c index 3b49aef..a2ffdba 100644 --- a/gcc/c-family/c-pragma.c +++ b/gcc/c-family/c-pragma.c @@ -1277,7 +1277,6 @@ static const struct omp_pragma_def omp_pragmas[] = { { "end", PRAGMA_OMP_END_DECLARE_TARGET }, { "flush", PRAGMA_OMP_FLUSH }, { "master", PRAGMA_OMP_MASTER }, - { "ordered", PRAGMA_OMP_ORDERED }, { "section", PRAGMA_OMP_SECTION }, { "sections", PRAGMA_OMP_SECTIONS }, { "single", PRAGMA_OMP_SINGLE }, @@ -1291,6 +1290,7 @@ static const struct omp_pragma_def omp_pragmas_simd[] = { { "declare", PRAGMA_OMP_DECLARE }, { "distribute", PRAGMA_OMP_DISTRIBUTE }, { "for", PRAGMA_OMP_FOR }, + { "ordered", PRAGMA_OMP_ORDERED }, { "parallel", PRAGMA_OMP_PARALLEL }, { "simd", PRAGMA_OMP_SIMD }, { "target", PRAGMA_OMP_TARGET }, -- cgit v1.1