Merge from mainline (gomp-merge-2005-02-26).
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.law / ctors5.C
blob334b59781b1f59afced35d344c24bdccd242206c
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|semicolon" }
25     x = xi;
28 const X X::x0( 0 );
30 Y::Y() // { dg-error "no match" }
32     xx = X::x0;