3 // Bug: members of anonymous unions are not access-controlled.
20 long B; // { dg-error "" } protected
21 void *pY; // { dg-error "" } protected
26 } PRT; // { dg-error "" } protected
27 int PRT_A; // { dg-error "" } protected
30 long C; // { dg-error "" } private
31 void *pZ; // { dg-error "" } private
36 } PRV; // { dg-error "" } private
37 int PRV_A; // { dg-error "" } private
40 struct Bar : public Foo {
47 printf("%x\n",PUB.pX);
49 printf("%x\n",Foo::pY);
52 printf("%x\n",Foo::PRT.pY);
53 PRV_A = 0; // { dg-error "" }
54 Foo::C = 0; // { dg-error "" }
55 printf("%x\n",pZ); // { dg-error "" }
56 Foo::PRV.C = 0; // { dg-error "" }
57 printf("%x\n",PRV.pZ); // { dg-error "" }
68 a.PRT_A = 0; // { dg-error "" }
69 a.B = 0; // { dg-error "" }
70 printf("%x\n",a.pY); // { dg-error "" }
71 a.PRV_A = 0; // { dg-error "" }
72 a.C = 0; // { dg-error "" }
73 printf("%x\n",a.pZ); // { dg-error "" }
75 printf("%x\n",a.PUB.pX);
76 a.PRT.B = 0; // { dg-error "" }
77 printf("%x\n",a.PRT.pY); // { dg-error "" }
78 a.PRV.C = 0; // { dg-error "" }
79 printf("%x\n",a.PRV.pZ); // { dg-error "" }