re PR c++/6037 (ICE in enum after switch() (gcc 3.0.4))

PR c++/6037
	* decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.

	* g++.dg/other/enum1.C: New test.

From-SVN: r51303
This commit is contained in:
Jakub Jelinek 2002-03-25 08:26:06 +01:00 committed by Jakub Jelinek
parent 56fec4f0e7
commit c2e525ebba
4 changed files with 12 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2002-03-25 Jakub Jelinek <jakub@redhat.com>
PR c++/6037
* decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
* typeck.c (expand_ptrmemfunc_cst): Scale idx down to an index

View File

@ -13111,9 +13111,6 @@ start_enum (name)
pushtag (name, enumtype, 0);
}
if (current_class_type)
TREE_ADDRESSABLE (b->tags) = 1;
return enumtype;
}

View File

@ -1,3 +1,7 @@
2002-03-25 Jakub Jelinek <jakub@redhat.com>
* g++.dg/other/enum1.C: New test.
2002-03-24 Richard Henderson <rth@redhat.com>
* gcc.c-torture/compile/920625-1.x: XFAIL -O1 too.

View File

@ -1,6 +1,6 @@
// PR c++/6037
// This testcase ICEd because start_enum expected pushtag to insert
// the tag always into current binding level.
/* PR c++/6037
This testcase ICEd because start_enum expected pushtag to insert
the tag always into current binding level. */
struct A
{