1 // { dg-options "-O2" } 2 3 struct BOOL { 4 int nVal:1, bSet:1; BOOLBOOL5 BOOL (int i) : nVal(i!=0), bSet(1) {} 6 }; 7 struct Fill { 8 void *d; FillFill9 Fill() : d(0) {} FillFill10 Fill( const Fill& ) {} 11 }; 12 struct SvMetaSlot { 13 Fill aGroupId; 14 BOOL a8; SvMetaSlotSvMetaSlot15 SvMetaSlot() : 16 a8(1) {} 17 SvMetaSlot* MakeClone() const; 18 }; 19 MakeClone()20SvMetaSlot* SvMetaSlot::MakeClone() const { return new SvMetaSlot( *this ); } 21 22 extern "C" void abort(void); main()23int main() 24 { 25 SvMetaSlot s; SvMetaSlot s2(s); 26 if (s.a8.bSet != s2.a8.bSet) 27 abort (); 28 return 0; 29 } 30