Merge to HEAD at tree-cleanup-merge-20041024 .
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.law / ctors5.C
blobd08805a36aadd0e082b5366ee6607f0a054e3f22
1 // { dg-do assemble  }
2 // GROUPS passed constructors
3 // ctors file
4 // Subject: bug in handling static const object of the enclosing class
5 // Date: Tue, 1 Sep 92 10:38:44 EDT
7 class X
8 { // { dg-error "X::X" } implicit constructor
9   private:
10     int x;
11   public:
12     static const X x0;
13     X( int );
16 class Y
18   private:
19     X xx;
20   public:
21     Y();
23 X::X( int xi ) // { dg-error "return type|X::X" }
25     x = xi;
28 const X X::x0( 0 );
30 Y::Y() // { dg-error "no match" }
32     xx = X::x0;