This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/6620: partial template specialization on int
- From: Reichelt <reichelt at igpm dot rwth-aachen dot de>
- To: gcc-gnats at gcc dot gnu dot org, jototland at hotmail dot com, gcc-bugs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: Mon, 13 May 2002 12:37:15 +0200
- Subject: Re: c++/6620: partial template specialization on int
Hi,
on can reduce the testcase a little more:
--------------------------snip here-------------------------------
template <int N> struct HoldInt {};
template <class A, class B> struct Add;
template <int N, int M> struct Add< HoldInt<N>, HoldInt<M> > {};
template <int N> struct Add< HoldInt<N>, HoldInt<-N> > {};
Add< HoldInt<1>, HoldInt<-1> > a;
--------------------------snip here-------------------------------
By the way, both testcases not only crash gcc but even SGI's native
compiler, so they seem to be a real compiler-killers ;-)
Greetings,
Volker Reichelt
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6620