c++ - clang++ crash with template wrapping aligned class -


i seeing weird crash trying use wrapper template class around aligned struct/class. following program crashing when compiled clang, while working both gcc , visual studio.

struct __attribute__( ( aligned( 16 ) ) ) alignedstruct {      alignedstruct( ) { }      float x,y,z,w; };  template <typename p1> class wrapper { public:     p1 inner; };  int main( ) {     wrapper<alignedstruct> * t1 = new wrapper<alignedstruct>( );     return 1; } 

the crash seems while calling alignedstruct constructor (if remove it, clang compiled code runs well).

can explain going on here?

thanks!

edit:

the crash occurs clang 3.4.2 under cygwin32 , cygwin64 , clang 3.4.1 under ubuntu 14.04 (x32) , ubuntu 14.10 (x32)

it not, however, occur when testing clang 3.4.1 under freebsd 10.1 (x32) , os x yosemite.

i've tried playing around compilation flags can't seem able make difference those, running clang++ file.cpp