OSDN Git Service

Add NIOS2 support. Code from SourceyG++.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.jason / friend.C
1 // { dg-do run  }
2 // Bug: g++ doesn't keep track of the lexical context of friends properly.
3
4 extern "C" void exit(int);
5
6 struct B;
7 struct A {
8   static void f () { exit (1); }
9 };
10
11 struct B {
12   static void f () { exit (0); }
13   friend void g (B) { f (); }
14 };
15
16 int main ()
17 {
18   B b;
19   g (b);
20 }