summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/access5.C
blob: 431ba416aacd33a10fea89057f9b03c0560bacf2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// { dg-do assemble  }

class A
{
protected:
  int i;     
};

class B : private A
{
protected:
  A::i;
};

struct C : public B {
  friend int f(C *p);
};

int f(C *p) {
  return p->i;
}