mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-30 15:35:40 +08:00
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: r51227
This commit is contained in:
parent
5365c83fd8
commit
e756a7da56
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
@ -13110,9 +13110,6 @@ start_enum (name)
|
||||
pushtag (name, enumtype, 0);
|
||||
}
|
||||
|
||||
if (current_class_type)
|
||||
TREE_ADDRESSABLE (b->tags) = 1;
|
||||
|
||||
return enumtype;
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
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.
|
||||
|
19
gcc/testsuite/g++.dg/other/enum1.C
Normal file
19
gcc/testsuite/g++.dg/other/enum1.C
Normal file
@ -0,0 +1,19 @@
|
||||
// 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;
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user