// PR c++/17743 template struct X { typedef char layout_type[sizeof(T)] __attribute ((aligned(__alignof(double)))); layout_type data; }; template struct Y { typedef char layout_type[sizeof(T)] __attribute ((aligned(__alignof(T)))); layout_type data; }; template struct Z { typedef char layout_type[sizeof(T)] __attribute ((aligned(__alignof(T)))); struct Z2 { layout_type data; } in; }; template struct A; template struct A { typedef char layout_type[sizeof(T)] __attribute ((aligned(__alignof(T)))); layout_type data; }; template struct StaticAssert; template<> struct StaticAssert {}; StaticAssert<__alignof(X) == __alignof(double)> d1; StaticAssert<__alignof(Y) == __alignof(double)> d2; StaticAssert<__alignof(Z) == __alignof(double)> d3; StaticAssert<__alignof(A) == __alignof(double)> d4;