From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6892 invoked by alias); 15 Nov 2002 16:52: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 6867 invoked by uid 61); 15 Nov 2002 16:52:06 -0000 Date: Thu, 21 Nov 2002 09:00:00 -0000 Message-ID: <20021115165206.6866.qmail@sources.redhat.com> To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, struppi@acm.org From: bangerth@dealii.org Reply-To: bangerth@dealii.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, struppi@acm.org, gcc-gnats@gcc.gnu.org Subject: Re: c++/8591: g++ crashes while instantiating templates X-SW-Source: 2002-11/txt/msg00771.txt.bz2 List-Id: Synopsis: g++ crashes while instantiating templates State-Changed-From-To: open->analyzed State-Changed-By: bangerth State-Changed-When: Fri Nov 15 08:52:05 2002 State-Changed-Why: Confirmed. A reduced testcase is ------------------------------------- namespace NS { template struct C {}; } template class X { friend class NS::C; }; X c; ---------------------------------- I get a segfault: tmp/g> /home/bangerth/bin/gcc-3.3x-pre/bin/g++ -c x.cc x.cc: In instantiation of `X': x.cc:10: instantiated from here x.cc:6: internal compiler error: Speicherzugriffsfehler Please submit a full bug report, with preprocessed source if appropriate. See for instructions. This is for all versions of gcc, including present CVS. My list of similar reports (friends and templates and/or namespaces) includes PRs 8355, 8280, 8099, 53, 641, 765, 1016, 6256. The last one may be the closest. By the way, the code is illegal, since you have to declare the friend as template <...> friend class NS::C; Fixing this makes the ICE go away. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8591