// PR 32519 // { dg-do compile } struct B { protected: template void f (); // { dg-error "protected" } }; struct D : public B { void g (B* b) { b->f (); // { dg-error "context" } } };