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: r51227
+2002-03-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/6037
+ * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
+
2002-03-23 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
* error.c (dump_type): Be careful about implicit typenames.
pushtag (name, enumtype, 0);
}
- if (current_class_type)
- TREE_ADDRESSABLE (b->tags) = 1;
-
return enumtype;
}
+2002-03-23 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/other/enum1.C: New test.
+
2002-03-23 Zack Weinberg <zack@codesourcery.com>
* gcc.dg/pragma-ep-3.c: Fix typo.
--- /dev/null
+// PR c++/6037
+// This testcase ICEd because start_enum expected pushtag to insert
+// the tag always into current binding level.
+
+struct A
+{
+ ~A () { }
+};
+
+struct B
+{
+ void foo ()
+ {
+ switch (0) { default: ; }
+ A a;
+ enum C { };
+ (void) a;
+ }
+};