summaryrefslogtreecommitdiff
path: root/gcc/c-parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r--gcc/c-parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c
index 0c90fa84bd8..8cad3108243 100644
--- a/gcc/c-parser.c
+++ b/gcc/c-parser.c
@@ -7379,7 +7379,7 @@ c_parser_omp_for_loop (c_parser *parser)
/* Only bother calling c_finish_omp_for if we havn't already generated
an error from the initialization parsing. */
- if (decl != NULL)
+ if (decl != NULL && decl != error_mark_node && init != error_mark_node)
return c_finish_omp_for (loc, decl, init, cond, incr, body, NULL);
return NULL;