@@ -11752,7 +11752,7 @@ c_parser_oacc_all_clauses (c_parser *par
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 *pars
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. */
@@ -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 } */
+ ;
+}