1 // Origin: PR c++/53540
2 // { dg-do compile { target c++11 } }
3 
4 template <typename T>
5 struct context
6 {
7   typedef int type;
8 };
9 
10 template <typename T>
function()11 void function()
12 {
13   using ctx1 = context<T>;
14   typename ctx1::type f1;
15 
16   typedef context<T> ctx2;
17   typename ctx2::type f2;
18 }
19 
main()20 int main()
21 {
22   function<int>();
23 }
24 
25