1 // PR c++/37554 2 3 struct A {}; 4 class B : A {}; 5 foo(B b)6 void foo(B b) 7 { 8 (A)b; // { dg-error "inaccessible base" } 9 } 10