aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.old-deja/g++.law/visibility11.C
blob: 051bf33ebe75466987199c4cd09c3e8ff8858082 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// { dg-do assemble  }
// { dg-options "-w" }
// GROUPS passed visibility
// visibility file
// From: Alan Shepherd <a.shepherd@nexor.co.uk>
// Date:     Tue, 22 Jun 1993 14:53:23 +0100
// Subject:  bug with MI in gcc-2.4.5
// Message-ID: <9659.740757203@nexor.co.uk>

class A
{
    int a;

protected:

    virtual void State(int b)   { a = b; }

};

class B : public A
{
    char* foo;

public:

    B(const char*);
};

class C : public A
{
    char* foo2;

public:

    C(const char*);
};

class D : public B, public C
{
public:
  D();
protected:

    virtual void State(int a)
    {
        B::State(a);
        C::State(a);
    }
};