From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32134 invoked by alias); 9 Jan 2004 18:08:47 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 32119 invoked by alias); 9 Jan 2004 18:08:47 -0000 Date: Fri, 09 Jan 2004 18:08:00 -0000 From: "gcc-bugzilla at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20040109180830.13635.jhbrown@bluefinrobotics.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/13635] New: specific order of template specialization causes ICE X-Bugzilla-Reason: CC X-SW-Source: 2004-01/txt/msg00826.txt.bz2 List-Id: Certain orders of partial specialization cause the compiler to emit an ICE: breakgcc.cc:14: internal compiler error: in register_specialization, at cp/pt.c :968 Environment: System: Linux razorfish 2.4.22-1-686 #6 Sat Oct 4 14:09:08 EST 2003 i686 GNU/Linux Architecture: i686 host: i486-pc-linux-gnu build: i486-pc-linux-gnu target: i486-pc-linux-gnu configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux How-To-Repeat: The following code demonstrates the problem, saved as breakgcc.ii and compiled with g++ -Wall breakgcc.ii Switching the order of the two specializations makes the problem go away. ------------------------------------------------------------ # 1 "breakgcc.cc" # 1 "" # 1 "" # 1 "breakgcc.cc" template class bar { public: template int func(baz *x); }; template <> template int bar::func(baz *x) { return 5;} template <> template <> int bar::func(int *x) { return 5;} ------------------------------------------------------------ ------- Additional Comments From jhbrown at bluefinrobotics dot com 2004-01-09 18:08 ------- Fix: Workaround: Re-order the specializations. -- Summary: specific order of template specialization causes ICE Product: gcc Version: 3.3.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jhbrown at bluefinrobotics dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i486-pc-linux-gnu GCC host triplet: i486-pc-linux-gnu GCC target triplet: i486-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13635