// { dg-options "-std=c++0x" } template class TT> struct X { }; template struct Y { }; template using Z = Y; void f(X); void g(X); void foo() { // Below x and y don't have the same type, because Y and Z don't // designate the same template ... X y; X z; // ... So these must fail to compile. f(z); // { dg-error "" } g(y); // { dg-error "" } } template struct A0 {}; template using AA0 = A0; template using AAA0 = AA0; void f0(A0); void g0() { AA0 a; AAA0 b; f0(a); f0(b); }