This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/7647: Internal compiler error


The following reply was made to PR c++/7647; it has been noted by GNATS.

From: Reichelt <reichelt@igpm.rwth-aachen.de>
To: simons@cryp.to, gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org,
        nobody@gcc.gnu.org
Cc:  
Subject: Re: c++/7647: Internal compiler error
Date: Mon, 30 Sep 2002 12:14:59 +0200

 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
 
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]