1 // { dg-do run  }
2 // Bug: g++ forgets about the instantiation of class1 when looking up
3 // class11_value, and tries to look things up in class1<class2>.
4 
5 template<class ItIsInt>
6 struct class1 {
7   struct class11 {
8     typedef ItIsInt class11_value;
9   };
10 };
11 
12 template<class ItIsClass2>
13 struct class3 {
14   int f();
15 };
16 
17 template<class ItIsClass2>
f()18 int class3<ItIsClass2>::f()
19 {
20   return typename class1<typename ItIsClass2::class2_value>::class11::class11_value(10);
21 }
22 
23 struct class2 {
24   typedef int class2_value;
25 };
26 
main()27 int main()
28 {
29   class3<class2> the_class3;
30   the_class3.f();
31 }
32