This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/7647: Internal compiler error
- From: Reichelt <reichelt at igpm dot rwth-aachen dot de>
- To: simons at cryp dot to, gcc-gnats at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: Mon, 30 Sep 2002 12:14:59 +0200
- Subject: Re: c++/7647: Internal compiler error
Hi,
the problem can be reduced to the following code snippet:
-------------------------snip here---------------------
template <typename T> struct A
{
void foo () const {}
char A;
};
void bar() { A<void>().foo(); }
-------------------------snip here---------------------
The code crashes with gcc 3.0.x, 3.1, 3.2, and the main trunk (as of
20020923). Checked on mips-sgi-irix6.5 and i686-pc-linux-gnu.
The error is:
PR7647.cc: In instantiation of `void A<T>::foo() const [with T = void]':
PR7647.cc:7: instantiated from here
PR7647.cc:3: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]
With gcc 2.95.3 I get:
PR7647.cc:4: ANSI C++ forbids data member `A' with same name as enclosing class
PR7647.cc: In instantiation of `A<void>::foo() const':
PR7647.cc:7: instantiated from here
PR7647.cc:3: confused by earlier errors, bailing out
Greetings,
Volker Reichelt
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7647