1// { dg-do run } 2// Bug: g++ doesn't keep track of the lexical context of friends properly. 3 4extern "C" void exit(int); 5 6struct B; 7struct A { 8 static void f () { exit (1); } 9}; 10 11struct B { 12 static void f () { exit (0); } 13 friend void g (B) { f (); } 14}; 15 16int main () 17{ 18 B b; 19 g (b); 20} 21