aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/access3.C
blob: 2ba2c0c51d67c63a6b0c9ab3a698a4b47ee2f72b (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
// Build don't link:
// The standard sez that a use of a name gets the most access it can through
// the various paths that can reach it.  Here, the access decl in B gives
// us access.

struct A
{
  void f ();			
};

struct B: private virtual A
{
  A::f;
};

struct C: private virtual A, public B
{
};

int
main ()
{
  C c;

  c.f ();			
}