diff options
author | Nathan Froyd <froydnj@codesourcery.com> | 2010-11-10 21:05:50 +0000 |
---|---|---|
committer | Nathan Froyd <froydnj@gcc.gnu.org> | 2010-11-10 21:05:50 +0000 |
commit | 75acdae9f346f316e82b008696cc33766c829d9a (patch) | |
tree | 92808e7ead7a5555a587145a727cf523f74bbbc4 /gcc/cp | |
parent | edb29996a50b9623dc244178b2d5e734cd89f9a7 (diff) | |
download | gcc-75acdae9f346f316e82b008696cc33766c829d9a.zip gcc-75acdae9f346f316e82b008696cc33766c829d9a.tar.gz gcc-75acdae9f346f316e82b008696cc33766c829d9a.tar.bz2 |
re PR c++/46065 (ICE: tree check: expected tree that contains 'decl minimal' structure, have 'tree_list' in poplevel_named_label_1, at cp/decl.c:477)
gcc/cp/
PR c++/46065
* decl.c (poplevel_named_label_1): Use TREE_CHAIN if necessary.
gcc/testsuite/
PR c++/46065
* g++.dg/pr46065.C: New test.
From-SVN: r166558
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 51e2171..04f95bb 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2010-11-10 Nathan Froyd <froydnj@codesourcery.com> + + PR c++/46065 + * decl.c (poplevel_named_label_1): Use TREE_CHAIN if necessary. + 2010-11-09 Jakub Jelinek <jakub@redhat.com> PR c++/45894 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index c372840..93af4b4 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -475,7 +475,11 @@ poplevel_named_label_1 (void **slot, void *data) { tree decl; - for (decl = ent->names_in_scope; decl; decl = DECL_CHAIN (decl)) + /* ENT->NAMES_IN_SCOPE may contain a mixture of DECLs and + TREE_LISTs representing OVERLOADs, so be careful. */ + for (decl = ent->names_in_scope; decl; decl = (DECL_P (decl) + ? DECL_CHAIN (decl) + : TREE_CHAIN (decl))) if (decl_jump_unsafe (decl)) VEC_safe_push (tree, gc, ent->bad_decls, decl); |