OSDN Git Service

efd09e52cfd8114a64cbe202f54d73ed9613a65c
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.jason / access22.C
1 // { dg-do assemble  }
2 // PRMS Id: 8518
3 // Bug: Call to foo is not checked for accessibility
4
5 class A
6 {
7   private:
8     static void foo() {}        // { dg-error "" } 
9   public:
10     void goo() {}
11 };
12
13 struct B : public A
14 {
15     void func() { foo(); }      // { dg-error "" } 
16 };
17
18 int main()
19 {
20     B b;
21     b.func();
22 }