summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/visibility6.C
blob: 92747926301a4833d37015d7e4b349e007e7f8de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// { dg-do assemble  }
// GROUPS passed visibility
// visibility file
// From: Rob Hasker <hasker@sparc0a.cs.uiuc.edu>
// Date:     Sat, 3 Apr 1993 13:19:05 -0600
// Subject:  no privacy
// Message-ID: <199304031919.AA20554@sparc17.cs.uiuc.edu
class Top {
public:
    Top() {}
      void val() {} // { dg-error "" } private base class
};

class Derived : private Top {
public:
    Derived() {}
};

class Unrelated {
    Derived derived;
public:
    void oops() { derived.val(); }// { dg-error "" } .*
};