From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25021 invoked by alias); 2 May 2003 17:36:01 -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 25001 invoked by uid 71); 2 May 2003 17:36:01 -0000 Date: Fri, 02 May 2003 17:36:00 -0000 Message-ID: <20030502173601.24998.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: "Giovanni Bajo" Subject: Re: c++/10223: template trickery causes ICE (segmentation fault) Reply-To: "Giovanni Bajo" X-SW-Source: 2003-05/txt/msg00143.txt.bz2 List-Id: The following reply was made to PR c++/10223; it has been noted by GNATS. From: "Giovanni Bajo" To: , , , , Cc: Subject: Re: c++/10223: template trickery causes ICE (segmentation fault) Date: Fri, 2 May 2003 19:28:29 +0200 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10223 Not really related to c++/9364 (as shown by my recent analysys of that PR). Instead, an epurated code snippet of this PR looks this way: -------------------------------------------- template struct Foo { template struct dummy; template static char test(dummy<&Q::whatever> *); }; struct Bar {}; template struct Foo; //template struct Foo; -------------------------------------------- pr10223.cpp: In instantiation of `Foo': pr10223.cpp:14: instantiated from here pr10223.cpp:8: internal compiler error: Segmentation fault Please submit a full bug report, If you instantiate the template with a basic type instead of Bar (using the commented line instead of the other one), we get an ICE on error recovery: pr10223.cpp: In instantiation of `Foo': pr10223.cpp:15: instantiated from here pr10223.cpp:5: error: creating pointer to member function of non-class type `int' pr10223.cpp:5: internal compiler error: in retrieve_specialization, at cp/pt.c:894 Please submit a full bug report, I keep both the ICEs in this same PR since they are very likely related. Reconfirmed on every GCC version I have (2.95 -> mainline CVS 20030430). After this redux has been fixed, I suggest trying again the original code provided by the poster, which could reveal other problems. Giovanni Bajo