1 // PR c++/38579 2 3 struct P 4 { 5 protected: PP6 P() {} PP7 P(const P&) {} 8 }; 9 10 struct B : protected P 11 { BB12 B() {} 13 }; 14 15 struct C : public P 16 { 17 // C can access P's copy ctor, but can't convert b to const P&. CC18 C(const B& b) : P(b) {} // { dg-error "inaccessible base" } 19 }; 20 foo()21void foo() 22 { 23 B b; 24 C c(b); 25 } 26