2 // g++ 1.37.1 bug 900428_03
4 // g++ fails to detect cases where a constructor for a derived class invokes
5 // (either explicitly or implicitly) a private constructor for a base class.
7 // cfront 2.0 passes this test.
9 // keywords: inheritance, private, accessability, constructors
12 int struct_0_data_member;
20 struct_0::struct_0 (int i) { }
21 struct_0::struct_0 (int, int) { } // { dg-error "is private" }
23 struct struct_1 : public struct_0 {
28 struct_1::struct_1 () : struct_0 (8,9) // { dg-error "within this context" }
33 struct_0 struct_2_data_member;
38 struct_2::struct_2 () : struct_2_data_member (8,9) // { dg-error "within this context" }
42 int main () { return 0; }