https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61458
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paolo at gcc dot gnu.org --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- The problem is the default value of the _Align parameter, which comes from alignof(__aligned_storage_msa<_Len>::__type) which is always the maximum alignment: template<size_t _Len> struct __aligned_storage_msa { union __type { unsigned char __data[_Len]; struct __attribute__((__aligned__)) { } __align; }; }; That effectively ignores _Len and will always have 16-byte alignment, which means sizeof(aligned_storage<N>) is always at least 16 bytes. Should the attribute be using __aligned__(_Len) or does that do the wrong thing in some cases?