From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1912 invoked by alias); 14 Nov 2002 05:26: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 1884 invoked by uid 71); 14 Nov 2002 05:26:00 -0000 Resent-Date: 14 Nov 2002 05:26:00 -0000 Resent-Message-ID: <20021114052600.1883.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, llib@computer.org Received: (qmail 32700 invoked from network); 14 Nov 2002 05:20:30 -0000 Received: from unknown (HELO antares.anu.edu.au) (150.203.160.26) by sources.redhat.com with SMTP; 14 Nov 2002 05:20:30 -0000 Received: from alto.anu.edu.au (alto [150.203.160.67]) by antares.anu.edu.au (8.9.3/8.9.3) with ESMTP id QAA17942 for ; Thu, 14 Nov 2002 16:20:29 +1100 (EST) Received: (from bill@localhost) by alto.anu.edu.au (8.9.3/8.9.3) id QAA13185; Thu, 14 Nov 2002 16:20:29 +1100 (EST) Message-Id: <200211140520.QAA13185@alto.anu.edu.au> Date: Wed, 20 Nov 2002 07:03:00 -0000 From: llib@computer.org To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: 3.113 Subject: c++/8572: ICE with external definition of conversion operator to internal class within template class X-SW-Source: 2002-11/txt/msg00646.txt.bz2 List-Id: >Number: 8572 >Category: c++ >Synopsis: ICE with external definition of conversion operator to internal class within template class >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-legal-code >Submitter-Id: net >Arrival-Date: Wed Nov 13 21:26:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: Bill Clarke >Release: 3.3 20021110 (experimental) >Organization: >Environment: System: SunOS alto 5.9 Generic sun4u sparc SUNW,Sun-Blade-1000 Architecture: sun4 host: sparc-sun-solaris2.9 build: sparc-sun-solaris2.9 target: sparc-sun-solaris2.9 configured with: ../gcc/configure --enable-languages=c,c++ >Description: internal compiler error with legal code (see How-To-Repeat) results in internal compiler error: templ-bug.cc:18: internal compiler error: in mangle_conv_op_name_for_type, at cp/mangle.c:2612 The problem occurs with a template class X, that has a conversion operator to a pointer to an internal class X::Y, where the conversion operator is defined external to the class. The problem does not occur with Z, since it is defined within the template definition. >How-To-Repeat: compile this code: // templ-bug.cc template struct X { struct Y { Y() { } }; operator Y* () const; struct Z { Z() { } }; operator Z* () const { return 0; } }; // implementation: template X::operator typename X::Y*() const { // this is line 18 return 0; } // eof ? ~/incoming/gcc-mainline-cvs/install/bin/g++ -c templ-bug.cc templ-bug.cc:18: internal compiler error: in mangle_conv_op_name_for_type, at cp/mangle.c:2612 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. ? >Fix: workaround: define the conversion operator within the class. >Release-Note: >Audit-Trail: >Unformatted: