// { dg-do link } // { dg-options "-g" } template struct S1 { struct SS1 { }; friend void Foo (const SS1& ss1) { } }; template void Foo(const S1& s1) { typedef typename S1::SS1 TYPE; TYPE t; Foo(t); } int main () { S1 obj; Foo(obj); }