1 // PR c++/14777
2 
3 template <typename T>
4 struct B
5 {
6 protected:
7   typedef int M;
8 };
9 
10 template <typename T>
11 struct A : B<T> {
12   typedef typename B<T>::M N;
13   A (int = N ());
14 };
15 
16 A<int> a = A<int> ();
17