diff options
author | Chung-Lin Tang <cltang@codesourcery.com> | 2019-02-19 14:10:15 +0000 |
---|---|---|
committer | Chung-Lin Tang <cltang@gcc.gnu.org> | 2019-02-19 14:10:15 +0000 |
commit | 19695f4d99e51181c37958680c99502e6f4edd08 (patch) | |
tree | c8cfec47a9c4cbc6e7d3353936b79246d8014e3f /gcc/cp | |
parent | 83fce9004a100215ac1b5e1ea5e1084bd2667c66 (diff) | |
download | gcc-19695f4d99e51181c37958680c99502e6f4edd08.zip gcc-19695f4d99e51181c37958680c99502e6f4edd08.tar.gz gcc-19695f4d99e51181c37958680c99502e6f4edd08.tar.bz2 |
re PR c/87924 (OpenACC wait clauses without async-arguments)
2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
PR c/87924
gcc/c/
* c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
gcc/cp/
* parser.c (cp_parser_oacc_clause_wait): Add representation of wait
clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
gcc/fortran/
* openmp.c (gfc_match_omp_clauses): Add representation of wait clause
without argument as 'wait (GOMP_ASYNC_NOVAL)'.
libgomp/
* oacc-parallel.c (GOACC_parallel_keyed): Remove condition on call to
goacc_wait().
(goacc_wait): Handle ACC_ASYNC_NOVAL case, remove goacc_thread() call
and related adjustment.
Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>
From-SVN: r269016
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/parser.c | 14 |
2 files changed, 16 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 2373c98..9c42190 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2019-02-19 Chung-Lin Tang <cltang@codesourcery.com> + + PR c/87924 + * parser.c (cp_parser_oacc_clause_wait): Add representation of wait + clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments. + 2019-02-19 Jakub Jelinek <jakub@redhat.com> PR c++/89387 diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index adb5f6f..f8d44e0 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -32867,17 +32867,23 @@ cp_parser_oacc_wait_list (cp_parser *parser, location_t clause_loc, tree list) } /* OpenACC: - wait ( int-expr-list ) */ + wait [( int-expr-list )] */ static tree cp_parser_oacc_clause_wait (cp_parser *parser, tree list) { location_t location = cp_lexer_peek_token (parser->lexer)->location; - if (cp_lexer_peek_token (parser->lexer)->type != CPP_OPEN_PAREN) - return list; + if (cp_lexer_peek_token (parser->lexer)->type == CPP_OPEN_PAREN) + list = cp_parser_oacc_wait_list (parser, location, list); + else + { + tree c = build_omp_clause (location, OMP_CLAUSE_WAIT); - list = cp_parser_oacc_wait_list (parser, location, list); + OMP_CLAUSE_DECL (c) = build_int_cst (integer_type_node, GOMP_ASYNC_NOVAL); + OMP_CLAUSE_CHAIN (c) = list; + list = c; + } return list; } |