aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-parser.c
diff options
context:
space:
mode:
authorChung-Lin Tang <cltang@codesourcery.com>2019-02-19 14:10:15 +0000
committerChung-Lin Tang <cltang@gcc.gnu.org>2019-02-19 14:10:15 +0000
commit19695f4d99e51181c37958680c99502e6f4edd08 (patch)
treec8cfec47a9c4cbc6e7d3353936b79246d8014e3f /gcc/c/c-parser.c
parent83fce9004a100215ac1b5e1ea5e1084bd2667c66 (diff)
downloadgcc-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/c/c-parser.c')
-rw-r--r--gcc/c/c-parser.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index cacbf0a..6c1f307 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -13412,7 +13412,7 @@ c_parser_oacc_clause_tile (c_parser *parser, tree list)
}
/* OpenACC:
- wait ( int-expr-list ) */
+ wait [( int-expr-list )] */
static tree
c_parser_oacc_clause_wait (c_parser *parser, tree list)
@@ -13421,6 +13421,14 @@ c_parser_oacc_clause_wait (c_parser *parser, tree list)
if (c_parser_peek_token (parser)->type == CPP_OPEN_PAREN)
list = c_parser_oacc_wait_list (parser, clause_loc, list);
+ else
+ {
+ tree c = build_omp_clause (clause_loc, OMP_CLAUSE_WAIT);
+
+ OMP_CLAUSE_DECL (c) = build_int_cst (integer_type_node, GOMP_ASYNC_NOVAL);
+ OMP_CLAUSE_CHAIN (c) = list;
+ list = c;
+ }
return list;
}