From 2ee10f818d0ae2d421ff6df19923acf509d71721 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 10 Sep 2015 09:32:13 +0200 Subject: re PR middle-end/67517 (ICE in gimplify_scan_omp_clauses) PR middle-end/67517 * gimplify.c (gimplify_scan_omp_clauses): Instead of asserting that decl is not specified in octx->variables, break out of the loop if it is. * c-c++-common/gomp/pr67517.c: New test. From-SVN: r227608 --- gcc/gimplify.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gcc/gimplify.c') diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 215ad15..2a7da25 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -6214,9 +6214,12 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p, } else break; - gcc_checking_assert (splay_tree_lookup (octx->variables, - (splay_tree_key) - decl) == NULL); + if (splay_tree_lookup (octx->variables, + (splay_tree_key) decl) != NULL) + { + octx = NULL; + break; + } flags = GOVD_SEEN; if (!OMP_CLAUSE_LINEAR_NO_COPYIN (c)) flags |= GOVD_FIRSTPRIVATE; -- cgit v1.1