aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/inherit/access2.C
blob: 24779945003edaf476f8f864db6d91d6d6cffd73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Test that a base doesn't get special rights to convert to itself.

struct A {
  void f ();
};

struct B: private A { };

B b;

void A::f ()
{
  A* ap = &b;			// { dg-error "base|inherit" "" }
}