This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19030] [4.0 Regression] ice on tree check
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Dec 2004 19:44:43 -0000
- Subject: [Bug c++/19030] [4.0 Regression] ice on tree check
- References: <20041216090722.19030.pluto@pld-linux.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-12-17 19:44 -------
Indeed, this can be demonstrated with the following testcase:
===============================
struct A;
namespace N
{
struct A;
}
using namespace N;
int A::i;
int A::i;
namespace N
{
struct C;
struct C {};
}
class D : N::C {};
===============================
With mainline I get the bogus error message:
PR19030.cc:10: error: 'A' has not been declared
PR19030.cc:11: error: 'A' has not been declared
PR19030.cc:11: error: redefinition of 'int i'
PR19030.cc:10: error: 'int i' previously declared here
PR19030.cc:16: error: conflicting declaration 'struct N::C'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PR19030.cc:15: error: 'struct N::C' has a previous declaration as 'struct N::C'
PR19030.cc:16: internal compiler error: tree check: expected class
'declaration', have 'exceptional' (error_mark) in pushtag, at
cp/name-lookup.c:4672
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19030