1 2 3 4 5 6 7 8 9 10 11 12 13 14
// { dg-do assemble } // GROUPS passed visibility struct base { protected: void base_func() {}// { dg-error "" } .*is protected.* }; struct derived : public base { protected: void derived_func(base *ptr) { ptr->base_func(); }// { dg-error "" } within this context };