summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/access22.C
blob: efd09e52cfd8114a64cbe202f54d73ed9613a65c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// { dg-do assemble  }
// PRMS Id: 8518
// Bug: Call to foo is not checked for accessibility

class A
{
  private:
    static void foo() {}	// { dg-error "" } 
  public:
    void goo() {}
};

struct B : public A
{
    void func() { foo(); }	// { dg-error "" } 
};

int main()
{
    B b;
    b.func();
}