Thomas Unterthiner wrote http://gcc.gnu.org/ml/gcc-help/2007-09/msg00098.html > class Vector3D > { > private: > typedef float v4sf __attribute__ (( vector_size(4 * sizeof(float)) )); > typedef int v4si __attribute__ (( vector_size(4 * sizeof(int)) )); > union > { > v4sf vec; > float v[4]; > } __attribute__((aligned(16))); > Vector3D(const v4sf& v); > > } __attribute__ ((aligned (16))); > > > As far as I understood it, this should guarantee correct alignment, > but %eax remains missaligned. > > On a side note, I stumpled upon this message while searching the web: > http://lists.xiph.org/pipermail/speex-dev/2007-August/006031.html > > Looks like they're having problems similar to mine, even though none of > their proposed solutions (using the align-attribute, switching the > relative positions of the variables within the union{} or using the > force_align_arg_pointer-attribute) seems to work for me (I'm using a > custom-build GCC, whereas I assume they are using the "official" GCC > 4.2.1 from mingw, so my config-flags for GCC are problably different, > maybe that has something to do with it). > > At this point I'm really a bit lost. Could this be a bug in GCC (or at > least MinGW)? > > > Thomas > Refer PR33774 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33774 Does the patch indicated there help?