From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5358 invoked by alias); 25 Apr 2002 09:26:03 -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 5327 invoked by uid 71); 25 Apr 2002 09:26:01 -0000 Resent-Date: 25 Apr 2002 09:26:00 -0000 Resent-Message-ID: <20020425092600.5326.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, Claudius Link Received:(qmail 5210 invoked from network); 25 Apr 2002 09:25:19 -0000 Received: from unknown (HELO clink.dyndns.org) (213.23.64.44) by sources.redhat.com with SMTP; 25 Apr 2002 09:25:19 -0000 Received: from zaphod.link-priv.de (zaphod.link-priv.de [192.168.1.6]) by clink.dyndns.org (Postfix) with ESMTP id 25CD314271; Thu, 25 Apr 2002 11:25:17 +0200 (CEST) Received: by zaphod.link-priv.de (Postfix, from userid 1001) id 0F48A16DDB4; Thu, 25 Apr 2002 11:23:32 +0200 (CEST) Message-Id:<20020425092332.0F48A16DDB4@zaphod.link-priv.de> Date: Thu, 25 Apr 2002 02:26:00 -0000 From: Claudius Link To: gcc-gnats@gcc.gnu.org, debian-gcc@lists.debian.org X-Send-Pr-Version:3.113 Subject: c++/6446: ICE specialising template constructor X-SW-Source: 2002-04/txt/msg01312.txt.bz2 List-Id: >Number: 6446 >Category: c++ >Synopsis: Template specialisation causes internal error >Confidential: no >Severity: serious >Priority: low >Responsible: unassigned >State: open >Class: ice-on-legal-code >Submitter-Id: net >Arrival-Date: Thu Apr 25 02:26:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Claudius Link >Release: 3.0.4 (Debian testing/unstable) >Organization: University Freiburg, Institute for Applied Mathematics >Environment: System: Linux zaphod 2.4.18 #1 SMP Tue Apr 16 19:32:36 CEST 2002 i686 unknown Architecture: i686 host: i386-pc-linux-gnu build: i386-pc-linux-gnu target: i386-pc-linux-gnu configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,objc --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --enable-threads=posix --enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux >Description: First of all, I am not sure if the code is really leagal. But a least I get an ICE for sure. If you create a templcate class without specifying a (default) constructor but you provide later a specialised (default) constructor. I get an ICE. The same applies for GNU C++ version 2.95.4 20011002 (Debian prerelease) (i386-linux) compiled by GNU C version 2.95.4 20011002 (Debian prerelease). >How-To-Repeat: # 1 "tempspec.cc" template struct Foo { }; Foo::Foo() { } void bar() { Foo f; } >Fix: Pretty easy. Just add the "prototype" of the constructor in the unspecialised template declaration. >Release-Note: >Audit-Trail: >Unformatted: