summaryrefslogtreecommitdiff
path: root/gcc/c-parser.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2006-04-26 08:23:12 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2006-04-26 08:23:12 +0000
commit1c59d5a8cc7ef3ea30e23f6c13440c00b4902e33 (patch)
treeaab43f6a1e168b21c80aab603cd23a16d448dce7 /gcc/c-parser.c
parentf77459c5ff68b948b4f6d664a5e9a4beb2cc3864 (diff)
downloadgcc-1c59d5a8cc7ef3ea30e23f6c13440c00b4902e33.tar.gz
PR c/25996
* c-parser.c (c_parser_omp_for_loop): Don't call c_finish_omp_for if either decl or init is error_mark_node. * gcc.dg/gomp/pr25996.c: New test. * g++.dg/gomp/pr25996.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113269 138bc75d-0d04-0410-961f-82ee72b054a4
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;