// { dg-do compile } struct A { static int i; }; struct B { typedef ::A A; }; int B::A::i = 0; struct K { struct L { template static void f(T); }; }; template struct O { typedef K Q; }; template void O::Q::L::f(T) { }