1// Red Hat bugzilla 64535 2// Bug: We are allocationg stuff into the tail padding of POD class "A". 3// { dg-do run } 4 5struct A 6{ 7 int x; 8 char y; 9}; 10 11struct B : public A { 12 virtual void f () {} 13 char z; 14}; 15 16A a = { 21, 42 }; 17B b; 18 19int 20main (void) 21{ 22 b.x = 12; 23 b.y = 24; 24 b.z = 36; 25 26 A *ap = &b; 27 28 *ap = a; 29 30 return (b.z != 36); 31} 32