1// { dg-do link  }
2// { dg-options "-O2" }
3
4class foo
5{
6};
7
8typedef void *voidp;
9class vect : public foo
10{
11public:
12  voidp& a();
13  int b();
14};
15
16class bar
17{
18public:
19  bar *c(bool (*f)(bar *node), voidp g)
20    {
21      int i=0;
22      bool j;
23      while (i < d.b()){
24        j = (f == __null) || f((bar*)d.a());
25        if (j)
26          ((bar*)d.a())->c(f, g);
27        i++;
28      }
29      return this;
30    }
31 public:
32  vect d;
33  bar *e(foo *k);
34};
35
36bar *bar::e(foo *k)
37{
38  return c(__null, k);
39}
40
41voidp &vect::a()
42{
43  static voidp x;
44  return x;
45}
46
47int vect::b()
48{
49  static int x;
50  return x;
51}
52
53int main()
54{
55  return 0;
56}
57