* c-common.c (get_priority): Add check for
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.pt / partial4.C
blobfd3554e558b43ca68b465bbdd8cd5db335d7097a
1 // { dg-do assemble  }
2 // Origin: Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr>
4 // Bug 29.  We failed to verify that template argument deduction
5 // produces a valid result in nondeduce context.
7 template<class T> struct Y { typedef T X; };
9 template<class T, class U> struct Base {};
11 template<class T> struct Base<T, typename T::X> {};
13 template<class T> struct Base<typename T::X, T> {};
15 template<class T, class U> struct Derived : Base <T, U> {};
17 struct A {};
19 template<class T> struct Derived<A, T> : Base< Y<T>, Y<T> > {};
21 int main()
23   Derived<A, int> d;