1 // { dg-do run } 2 3 // Copyright (C) 2001 Free Software Foundation, Inc. 4 // Contributed by Nathan Sidwell 3 Sept 2001 <nathan@codesourcery.com> 5 6 // Bug 4203. We were bit copying empty bases including the 7 // padding. Which clobbers whatever they overlay. 8 9 class EmptyBase0 {}; 10 class EmptyBase1 : public EmptyBase0 {}; 11 class Base1 12 { 13 public: 14 unsigned int t_; Base1(unsigned int t)15Base1(unsigned int t) : t_(t) {} 16 }; 17 18 class PEPE : public Base1, public EmptyBase1 19 { 20 public: PEPE(unsigned int t)21PEPE(unsigned int t) 22 : Base1(t), EmptyBase1(EmptyBase1()) {} 23 }; 24 main()25int main() 26 { 27 PEPE pepe(0xff); 28 29 return pepe.t_ != 255; 30 } 31