summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/visibility25.C
blob: 167436d00687da91c261eb58876029ec76571f3e (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 assemble  }
// GROUPS passed visibility
// visibility file
// From: gfm@mencon.mencon.oz.au (Graham Menhennitt)
// Date:     Wed, 17 Nov 93 21:30:32 EST
// Subject:  gcc 2.5.3 - can't privately inherit and contain same class
// Message-ID: <9311171030.AA00604@mencon>
#include        <iostream>

class A {
public:
        A(void);
};

class B : private A {
public:
        B(void) : A() {}
};

class C : public B {
public:
        C(void) : B(), a() {}

private:
        ::A a;
};