1 // { dg-do assemble } 2 // Origin: David Mazieres <dm@amsterdam.lcs.mit.edu> 3 4 template<class T> struct vector_base { 5 typedef T elm_t; 6 protected: 7 union { 8 double alignment_hack; 9 char defbuf_space[2 * sizeof (elm_t)]; 10 }; def_basepvector_base11 elm_t *def_basep () { return reinterpret_cast<elm_t *> (defbuf_space); } 12 }; 13 14 template<class T> struct vector : public vector_base<T> { vectorvector15 vector () { this->def_basep (); } 16 }; 17 18 vector<int> iv; 19