From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27076 invoked by alias); 30 Sep 2002 09:36:06 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 27061 invoked by uid 71); 30 Sep 2002 09:36:05 -0000 Date: Mon, 30 Sep 2002 02:36:00 -0000 Message-ID: <20020930093605.27060.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Reichelt Subject: Re: c++/7647: Internal compiler error Reply-To: Reichelt X-SW-Source: 2002-09/txt/msg00839.txt.bz2 List-Id: The following reply was made to PR c++/7647; it has been noted by GNATS. From: Reichelt 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 struct A { void foo () const {} char A; }; void bar() { A().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::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::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