Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / g++.old-deja / g++.bugs / 900428_03.C
blobd0625c4b4736a2b46cc653d4091c246c7e93d1b8
1 // { dg-do assemble  }
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
11 struct struct_0 {
12   int struct_0_data_member;
14 private:
15   struct_0 (int, int);
16 public:
17   struct_0 (int);
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 {
25   struct_1 ();
28 struct_1::struct_1 () : struct_0 (8,9) // { dg-error "within this context" }
32 struct struct_2 {
33   struct_0 struct_2_data_member;
35   struct_2 ();
38 struct_2::struct_2 () : struct_2_data_member (8,9) // { dg-error "within this context" }
42 int main () { return 0; }