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
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
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. */
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. */
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.
--- /dev/null
+/* 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 } */
+ ;
+}