re PR c/67501 (Bad error recovery for invalid OpenMP clauses in C FE)
PR c/67501 * c-parser.c (c_parser_oacc_all_clauses, c_parser_omp_all_clauses): Remove invalid clause from list of clauses even if parser->error is set. * c-c++-common/gomp/pr67501.c: New test. From-SVN: r227578
This commit is contained in:
parent
fce5e5e35f
commit
0bb99c1162
@ -1,5 +1,10 @@
|
||||
2015-09-09 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/67501
|
||||
* c-parser.c (c_parser_oacc_all_clauses,
|
||||
c_parser_omp_all_clauses): Remove invalid clause from
|
||||
list of clauses even if parser->error is set.
|
||||
|
||||
PR c/67500
|
||||
* c-parser.c (c_parser_omp_clause_aligned,
|
||||
c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
|
||||
|
@ -11752,7 +11752,7 @@ c_parser_oacc_all_clauses (c_parser *parser, omp_clause_mask mask,
|
||||
|
||||
first = false;
|
||||
|
||||
if (((mask >> c_kind) & 1) == 0 && !parser->error)
|
||||
if (((mask >> c_kind) & 1) == 0)
|
||||
{
|
||||
/* Remove the invalid clause(s) from the list to avoid
|
||||
confusing the rest of the compiler. */
|
||||
@ -11981,7 +11981,7 @@ c_parser_omp_all_clauses (c_parser *parser, omp_clause_mask mask,
|
||||
|
||||
first = false;
|
||||
|
||||
if (((mask >> c_kind) & 1) == 0 && !parser->error)
|
||||
if (((mask >> c_kind) & 1) == 0)
|
||||
{
|
||||
/* Remove the invalid clause(s) from the list to avoid
|
||||
confusing the rest of the compiler. */
|
||||
|
@ -1,5 +1,8 @@
|
||||
2015-09-09 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/67501
|
||||
* c-c++-common/gomp/pr67501.c: New test.
|
||||
|
||||
PR c/67500
|
||||
* gcc.dg/gomp/pr67500.c: New test.
|
||||
|
||||
|
12
gcc/testsuite/c-c++-common/gomp/pr67501.c
Normal file
12
gcc/testsuite/c-c++-common/gomp/pr67501.c
Normal file
@ -0,0 +1,12 @@
|
||||
/* PR c/67501 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-fopenmp" } */
|
||||
|
||||
void
|
||||
foo (void)
|
||||
{
|
||||
int i, j;
|
||||
#pragma omp for simd copyprivate(j /* { dg-error "before end of line" } */
|
||||
for (i = 0; i < 16; ++i) /* { dg-error "is not valid for" "" { target *-*-* } 9 } */
|
||||
;
|
||||
}
|
Loading…
Reference in New Issue
Block a user