// { dg-do compile } struct K { struct L { static double j; }; }; template struct M { struct N { static int i; }; }; template struct O { typedef M P; typedef K Q; }; template int O::P::N::i = 42; // This is obfuscated, but apparently ok. template double O::Q::L::j = 42.0; // { dg-error "non-template" }