1 // { dg-do assemble  }
2 // GROUPS passed visibility
3 // visibility file
4 // rom: roland@jts.com (Roland Knight )
5 // Date:     Sat, 8 May 1993 17:27:35 -0400
6 // Subject:  gcc 2.3.3 protected member access bug
7 // Message-ID: <9305082127.AA19577@icepick.jts.com>
8 
9 class A {
10 protected:
11     int a; // { dg-message "" } protected
12 };
13 
14 class B : public A {
15 public:
16     void f1(A* pa);
17 };
18 
19 
f1(A * pa)20 void B::f1(A* pa) {
21     pa->a = 1;    // illegal but allowed by gcc// { dg-error "" } .*
22 }
23