1// Contributed by Dodji Seketeli <dodji@redhat.com>
2// Origin PR c++/39754
3// { dg-do compile }
4
5template<typename> struct A ;
6template<typename T ,typename = A<T> > struct B { } ;
7
8template<class W, class>
9struct D
10{
11  typedef W X;
12  A<X[2]> a;
13} ;
14
15template<class Y>
16struct E
17{
18  B<Y[2]> b;
19};
20
21E < int > e;
22
23