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