diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/c/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c/c-parser.c | 10 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/parser.c | 14 | ||||
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/openmp.c | 14 |
6 files changed, 50 insertions, 6 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index 1def92a..b76f5b1 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,9 @@ +2019-02-19 Chung-Lin Tang <cltang@codesourcery.com> + + PR c/87924 + * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait + clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments. + 2019-02-15 Jakub Jelinek <jakub@redhat.com> PR c/89340 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; } 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; } diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 43eda8c..989bf9a 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2019-02-19 Chung-Lin Tang <cltang@codesourcery.com> + + PR c/87924 + * openmp.c (gfc_match_omp_clauses): Add representation of wait clause + without argument as 'wait (GOMP_ASYNC_NOVAL)'. + 2019-02-18 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/87689 diff --git a/gcc/fortran/openmp.c b/gcc/fortran/openmp.c index 8651afa..11dd3ae 100644 --- a/gcc/fortran/openmp.c +++ b/gcc/fortran/openmp.c @@ -1885,7 +1885,19 @@ gfc_match_omp_clauses (gfc_omp_clauses **cp, const omp_mask mask, break; } else if (m == MATCH_NO) - needs_space = true; + { + gfc_expr *expr + = gfc_get_constant_expr (BT_INTEGER, + gfc_default_integer_kind, + &gfc_current_locus); + mpz_set_si (expr->value.integer, GOMP_ASYNC_NOVAL); + gfc_expr_list **expr_list = &c->wait_list; + while (*expr_list) + expr_list = &(*expr_list)->next; + *expr_list = gfc_get_expr_list (); + (*expr_list)->expr = expr; + needs_space = true; + } continue; } if ((mask & OMP_CLAUSE_WORKER) |