2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / explicit72.C
blobf0e88acfc09e8bab8628c5391b8ede8a207875dd
1 // { dg-do assemble  }
2 // Contributed by Reid M. Pinchback <reidmp@MIT.EDU>
3 // Adapted by Alexandre Oliva <oliva@dcc.unicamp.br>
4 // plain char, signed char and unsigned char are distinct types
6 template <class X, class Y> struct bug {};
7 template <class X> struct bug<X,char> { typedef char t; };
8 template <class X> struct bug<X,unsigned char> { typedef unsigned char t; };
9 template <class X> struct bug<X,signed char> { typedef signed char t; };
10 template <class X> struct bug<char,X> { typedef char t; };
11 template <class X> struct bug<unsigned char,X> { typedef unsigned char t; };
12 template <class X> struct bug<signed char,X> { typedef signed char t; };
14 void foo() {
15   bug<int,char>::t();
16   bug<int,signed char>::t();
17   bug<int,unsigned char>::t();
18   bug<char,int>::t();
19   bug<signed char,int>::t();
20   bug<unsigned char,int>::t();