From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29607 invoked by alias); 22 May 2007 04:00:09 -0000 Received: (qmail 29336 invoked by uid 48); 22 May 2007 03:59:55 -0000 Date: Tue, 22 May 2007 04:00:00 -0000 Subject: [Bug c++/32029] New: Internal Compiler Error on instantiation of template parameter X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ejt at andrew dot cmu dot edu" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-05/txt/msg01810.txt.bz2 When there is a default template parameter based on a templated class member type, the compiler dies a nasty death. As far as I can tell, gcc prior to 4.1 branch works fine, but all of the 4.1 branch seems to have this problem. Quick summary... This works: template::template Factory > class thing {/*...*/}; This ICEs: template::Factory > class thing {/*...*/}; whenever you try to instantiate 'thing', as seen below: $ g++ -Wall bug.cc -o bug bug.cc: In instantiation of ‘Factory0Arg::Factory’: bug.cc:41: instantiated from ‘void thing::makeIt() [with T = foo, Al = Factory0Arg::Factory]’ bug.cc:53: instantiated from here bug.cc:19: internal compiler error: in instantiate_class_template, at cp/pt.c:5666 I would at least hope for a better error message assuming that's not valid syntax ;) I'll attach original and preprocessed source. -- Summary: Internal Compiler Error on instantiation of template parameter Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ejt at andrew dot cmu dot edu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32029