diff options
author | Tobias Burnus <burnus@net-b.de> | 2014-01-03 21:24:50 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2014-01-03 21:24:50 +0100 |
commit | 54a990d324f731560ccf4eaec64c6ec9da33eb7d (patch) | |
tree | 120801480860e2c40fe46493fc0ae584eb1db504 /gcc/cp | |
parent | 82d89471a4ee354af3105064b8c60c92a30fa4eb (diff) | |
download | gcc-54a990d324f731560ccf4eaec64c6ec9da33eb7d.zip gcc-54a990d324f731560ccf4eaec64c6ec9da33eb7d.tar.gz gcc-54a990d324f731560ccf4eaec64c6ec9da33eb7d.tar.bz2 |
re PR c++/58567 (ICE with invalid loop variable in template using openmp)
2014-01-03 Tobias Burnus <burnus@net-b.de>
PR c++/58567
* pt.c (tsubst_omp_for_iterator): Early return for
* error_mark_node.
2014-01-03 Tobias Burnus <burnus@net-b.de>
PR c++/58567
* g++.dg/gomp/pr58567.C: New.
From-SVN: r206322
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/pt.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e89bc50..7021108 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2014-01-03 Tobias Burnus <burnus@net-b.de> + + PR c++/58567 + * pt.c (tsubst_omp_for_iterator): Early return for error_mark_node. + 2014-01-03 Paolo Carlini <paolo.carlini@oracle.com> Core DR 1442 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 3b8f83a..98d7365 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -13035,6 +13035,10 @@ tsubst_omp_for_iterator (tree t, int i, tree declv, tree initv, init_decl = (init && TREE_CODE (init) == DECL_EXPR); init = RECUR (init); decl = RECUR (decl); + + if (decl == error_mark_node || init == error_mark_node) + return; + if (init_decl) { gcc_assert (!processing_template_decl); |