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
This commit is contained in:
Nathan Froyd 2010-11-10 21:05:50 +00:00 committed by Nathan Froyd
parent edb29996a5
commit 75acdae9f3
4 changed files with 26 additions and 1 deletions

View File

@ -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

View File

@ -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);

View File

@ -1,3 +1,8 @@
2010-11-10 Nathan Froyd <froydnj@codesourcery.com>
PR c++/46065
* g++.dg/pr46065.C: New test.
2010-11-10 Jan Hubicka <jh@suse.cz>
PR tree-optimize/33172

View File

@ -0,0 +1,11 @@
// PR c++/46065
// { dg-do compile }
void bar ();
void
foo ()
{
using ::bar;
label:;
}