FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.dg / init / copy5.C
blobcef5a2950ef170e531ac8dae6b2538a057adf582
1 // { dg-options "-O2" }
3 struct BOOL {
4     int nVal:1, bSet:1;
5     BOOL (int i) : nVal(i!=0), bSet(1) {}
6 };
7 struct Fill {
8     void *d;
9     Fill() : d(0) {}
10     Fill( const Fill& ) {}
12 struct SvMetaSlot {
13     Fill aGroupId;
14     BOOL a8;
15     SvMetaSlot() :
16       a8(1) {}
17     SvMetaSlot* MakeClone() const;
20 SvMetaSlot* SvMetaSlot::MakeClone() const { return new SvMetaSlot( *this ); }
22 extern "C" void abort(void);
23 int main()
25   SvMetaSlot s; SvMetaSlot s2(s);
26   if (s.a8.bSet != s2.a8.bSet)
27     abort ();
28   return 0;