3 // Contributed by Nathan Sidwell 15 Dec 2003 <nathan@codesourcery.com>
4 // Origin: Tasso Karkanis <Tasso.Karkanis@rogers.com>
5 // PR c++/13387. Clobbered tail padding of base
7 inline void *operator new (__SIZE_TYPE__, void *ptr)
13 Base() : i(0), c(0) {}
25 char base_alias[sizeof (Base)];
28 for (unsigned ix = sizeof base_alias; ix--;)
29 base_alias[ix] = 0x55;
30 base = new (&base_alias) Base ();
32 static_cast <Base &> (sub) = *base;