diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-05-30 23:36:24 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-05-30 23:36:24 +0200 |
commit | 00631022d83c44777b37f168831eb64142737cbe (patch) | |
tree | b2bd7a6c98062669b723c17a2f37e5aaae9ab967 /gcc/c | |
parent | c8743fc5e5d6959e82d0d5d3ef03c36987921423 (diff) | |
download | gcc-00631022d83c44777b37f168831eb64142737cbe.zip gcc-00631022d83c44777b37f168831eb64142737cbe.tar.gz gcc-00631022d83c44777b37f168831eb64142737cbe.tar.bz2 |
re PR c++/71349 (Combined async target clause parsing issues)
PR c++/71349
* c-parser.c (c_parser_omp_for): Don't disallow nowait clause
when combined with target construct.
* parser.c (cp_parser_omp_for): Don't disallow nowait clause
when combined with target construct.
(cp_parser_omp_parallel): Pass cclauses == NULL as last argument
to cp_parser_omp_all_clauses.
* c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
instead of C_OMP_CLAUSE_SPLIT_FOR.
* c-c++-common/gomp/clauses-1.c (bar): Add dd argument. Add
nowait depend(inout: dd[0]) clauses where permitted.
From-SVN: r236900
Diffstat (limited to 'gcc/c')
-rw-r--r-- | gcc/c/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c/c-parser.c | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index f7d1a6d..d2a8947 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,9 @@ +2016-05-30 Jakub Jelinek <jakub@redhat.com> + + PR c++/71349 + * c-parser.c (c_parser_omp_for): Don't disallow nowait clause + when combined with target construct. + 2016-05-26 Jakub Jelinek <jakub@redhat.com> * c-parser.c (c_parser_omp_clause_schedule): Warn if diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c index fda2df8..bca8653 100644 --- a/gcc/c/c-parser.c +++ b/gcc/c/c-parser.c @@ -15113,7 +15113,9 @@ c_parser_omp_for (location_t loc, c_parser *parser, strcat (p_name, " for"); mask |= OMP_FOR_CLAUSE_MASK; - if (cclauses) + /* parallel for{, simd} disallows nowait clause, but for + target {teams distribute ,}parallel for{, simd} it should be accepted. */ + if (cclauses && (mask & (OMP_CLAUSE_MASK_1 << PRAGMA_OMP_CLAUSE_MAP)) == 0) mask &= ~(OMP_CLAUSE_MASK_1 << PRAGMA_OMP_CLAUSE_NOWAIT); /* Composite distribute parallel for{, simd} disallows ordered clause. */ if ((mask & (OMP_CLAUSE_MASK_1 << PRAGMA_OMP_CLAUSE_DIST_SCHEDULE)) != 0) |