public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13635] New: specific order of template specialization causes ICE
@ 2004-01-09 18:08 gcc-bugzilla at gcc dot gnu dot org
  2004-01-09 19:12 ` [Bug c++/13635] [3.3/3.4 regression] ICE in register_specialization for specific order of template specialization bangerth at dealii dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2004-01-09 18:08 UTC (permalink / raw)
  To: gcc-bugs

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 "<built-in>"
# 1 "<command line>"
# 1 "breakgcc.cc"
template <class foo>
class bar {
public:
        template <class baz>
        int func(baz *x);
};

template <>
template <class baz>
int bar<double>::func(baz *x) { return 5;}

template <>
template <>
int bar<double>::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


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2004-02-23 14:44 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-09 18:08 [Bug c++/13635] New: specific order of template specialization causes ICE gcc-bugzilla at gcc dot gnu dot org
2004-01-09 19:12 ` [Bug c++/13635] [3.3/3.4 regression] ICE in register_specialization for specific order of template specialization bangerth at dealii dot org
2004-01-11  1:19 ` [Bug c++/13635] " pinskia at gcc dot gnu dot org
2004-01-11 12:01 ` giovannibajo at libero dot it
2004-01-12 14:10 ` [Bug c++/13635] [3.3/3.4 regression] " bangerth at dealii dot org
2004-01-19  0:48 ` [Bug c++/13635] [3.3/3.4/3.5 " cvs-commit at gcc dot gnu dot org
2004-01-19  0:48 ` cvs-commit at gcc dot gnu dot org
2004-01-23 14:30 ` lerdsuwa at gcc dot gnu dot org
2004-02-05 16:05 ` lerdsuwa at gcc dot gnu dot org
2004-02-14 11:29 ` cvs-commit at gcc dot gnu dot org
2004-02-14 11:46 ` cvs-commit at gcc dot gnu dot org
2004-02-14 11:49 ` [Bug c++/13635] [3.3 " lerdsuwa at gcc dot gnu dot org
2004-02-15 12:38 ` gdr at gcc dot gnu dot org
2004-02-23 14:43 ` cvs-commit at gcc dot gnu dot org
2004-02-23 14:44 ` lerdsuwa at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).