From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20490 invoked by alias); 16 Jan 2003 15:12:11 -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 20423 invoked by uid 61); 16 Jan 2003 15:12:10 -0000 Date: Thu, 16 Jan 2003 15:12:00 -0000 Message-ID: <20030116151209.20409.qmail@sources.redhat.com> To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, martin@xemacs.org, nobody@gcc.gnu.org From: bangerth@dealii.org Reply-To: bangerth@dealii.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, martin@xemacs.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: c++/9338: ICE in peculiar templated constructors X-SW-Source: 2003-01/txt/msg01007.txt.bz2 List-Id: Synopsis: ICE in peculiar templated constructors State-Changed-From-To: open->analyzed State-Changed-By: bangerth State-Changed-When: Thu Jan 16 07:12:02 2003 State-Changed-Why: Confirmed. A smaller testcase is this: ------------------------- struct Bool { template struct CC { typedef int Int; }; template struct S1 { enum { value = true }; }; template struct S2 { enum { value = false }; }; template Bool (T x, typename CC::value>::Int = 0); template Bool (T x, typename CC::value>::Int = 0); }; int main () { Bool b (1); } -------------------------------------- Note that the second type of the two overloads of the constructor resolve to the same type, int. This code crashes gcc since at least 2.95: g/a> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc x.cc: In function `int main()': x.cc:15: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. W. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9338