2 // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org>
3 // DR142: Injection-related errors in access example
5 class B { // { dg-error "inaccessible" }
7 int mi; // { dg-error "inaccessible" }
8 static int si; // { dg-error "inaccessible" }
19 mi = 3; // { dg-error "within this context" "" }
20 si = 3; // { dg-error "within this context" "" }
25 ::B* bp1 = this; // { dg-error "inaccessible base" "" }
26 ::B* bp2 = (::B*)this;
30 B b2; // { dg-error "within this context" "" }
31 B::si = 3; // { dg-error "within this context" "" }