OpenACC wait list diagnostic change
2018-12-04 James Norris <jnorris@codesourcery.com> Cesar Philippidis <cesar@codesourcery.com> Julian Brown <julian@codesourcery.com> gcc/c/ * c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic code. gcc/cp/ * parser.c (cp_parser_oacc_wait_list): Fix error message and avoid duplicate diagnostic. gcc/testsuite/ * c-c++-common/goacc/asyncwait-1: Update expected errors and add a test for "wait (". Reviewed-by: Thomas Schwinge <thomas@codesourcery.com> Reviewed-by: Joseph Myers <joseph@codesourcery.com> From-SVN: r266774
This commit is contained in:
parent
f0e98f1bb4
commit
9df6c0e4ed
6 changed files with 27 additions and 12 deletions
|
@ -1,3 +1,10 @@
|
|||
2018-12-04 James Norris <jnorris@codesourcery.com>
|
||||
Cesar Philippidis <cesar@codesourcery.com>
|
||||
Julian Brown <julian@codesourcery.com>
|
||||
|
||||
* c-parser.c (c_parser_oacc_wait_list): Remove dead diagnostic
|
||||
code.
|
||||
|
||||
2018-11-30 Richard Biener <rguenther@suse.de>
|
||||
|
||||
* gimple-parser.c (c_parser_gimple_postfix_expression): Parse
|
||||
|
|
|
@ -11801,14 +11801,6 @@ c_parser_oacc_wait_list (c_parser *parser, location_t clause_loc, tree list)
|
|||
return list;
|
||||
|
||||
args = c_parser_expr_list (parser, false, true, NULL, NULL, NULL, NULL);
|
||||
|
||||
if (args->length () == 0)
|
||||
{
|
||||
c_parser_error (parser, "expected integer expression before ')'");
|
||||
release_tree_vector (args);
|
||||
return list;
|
||||
}
|
||||
|
||||
args_tree = build_tree_list_vec (args);
|
||||
|
||||
for (t = args_tree; t; t = TREE_CHAIN (t))
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2018-12-04 Julian Brown <julian@codesourcery.com>
|
||||
|
||||
* parser.c (cp_parser_oacc_wait_list): Fix error message and avoid
|
||||
duplicate diagnostic.
|
||||
|
||||
2018-12-04 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/88103
|
||||
|
|
|
@ -32605,9 +32605,11 @@ cp_parser_oacc_wait_list (cp_parser *parser, location_t clause_loc, tree list)
|
|||
|
||||
if (args == NULL || args->length () == 0)
|
||||
{
|
||||
cp_parser_error (parser, "expected integer expression before ')'");
|
||||
if (args != NULL)
|
||||
release_tree_vector (args);
|
||||
{
|
||||
cp_parser_error (parser, "expected integer expression list");
|
||||
release_tree_vector (args);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2018-12-04 Julian Brown <julian@codesourcery.com>
|
||||
|
||||
* c-c++-common/goacc/asyncwait-1: Update expected errors and add a
|
||||
test for "wait (".
|
||||
|
||||
2018-12-04 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/88103
|
||||
|
|
|
@ -116,7 +116,6 @@ f (int N, float *a, float *b)
|
|||
}
|
||||
|
||||
#pragma acc parallel copyin (a[0:N]) copy (b[0:N]) wait (1 /* { dg-error "expected '\\\)' before end of line" } */
|
||||
/* { dg-error "expected integer expression before '\\\)'" "" { target c++ } .-1 } */
|
||||
{
|
||||
for (ii = 0; ii < N; ii++)
|
||||
b[ii] = a[ii];
|
||||
|
@ -152,6 +151,12 @@ f (int N, float *a, float *b)
|
|||
b[ii] = a[ii];
|
||||
}
|
||||
|
||||
#pragma acc parallel copyin (a[0:N]) copy (b[0:N]) wait ( /* { dg-error "expected (primary-|)expression before" } */
|
||||
{
|
||||
for (ii = 0; ii < N; ii++)
|
||||
b[ii] = a[ii];
|
||||
}
|
||||
|
||||
#pragma acc parallel copyin (a[0:N]) copy (b[0:N]) wait
|
||||
{
|
||||
for (ii = 0; ii < N; ii++)
|
||||
|
@ -171,7 +176,6 @@ f (int N, float *a, float *b)
|
|||
#pragma acc wait (1,2,,) /* { dg-error "expected (primary-|)expression before" } */
|
||||
|
||||
#pragma acc wait (1 /* { dg-error "expected '\\\)' before end of line" } */
|
||||
/* { dg-error "expected integer expression before '\\\)'" "" { target c++ } .-1 } */
|
||||
|
||||
#pragma acc wait (1,*) /* { dg-error "expected (primary-|)expression before" } */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue