// { dg-do run } class C { template friend void f(T) { C c; c.i = 3; } int i; }; int main() { f(7); }