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 "" } xref from below
23 struct struct_1 : public struct_0 {
28 struct_1::struct_1 () : struct_0 (8,9)
33 struct_0 struct_2_data_member;
38 // g++ catches the following error (but does so only at the line with the
39 // closing curly brace).
41 struct_2::struct_2 () : struct_2_data_member (8,9)
42 { // { dg-error "" } should be up one line
45 int main () { return 0; }