| 1 |
// { dg-do assemble } |
| 2 |
// Contributed by Reid M. Pinchback <[email protected]> |
| 3 |
// Adapted by Alexandre Oliva <[email protected]> |
| 4 |
// plain char, signed char and unsigned char are distinct types |
| 5 |
|
| 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; }; |
| 13 |
|
| 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(); |
| 21 |
} |