summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/lookup6.C
blob: a66302b62c57cf01279ca78d55a6d3ccb27098c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// { dg-do run  }
int f(int i)
{
  struct C {
    int i;
    C () : i(1) {}
    int f() {    
      struct D {
        int i;
	D () : i(2) {}
        int g() { return i; }
      } d;

      return d.g();
    }
  } c;

  return c.f();
}


int main()
{
  if (f(0) != 2)
    return 1;
}