1 // PR c++/56859
2 // { dg-require-effective-target c++11 }
3 
4 template<unsigned size, unsigned alignment>
5 struct aligned_storage
6 {
7   using type = struct { alignas(alignment) unsigned char data[size]; };
8 };
9 
10 #define SA(X) static_assert((X),#X)
11 SA(alignof(aligned_storage<8,1>::type) == 1);
12 SA(alignof(aligned_storage<8,2>::type) == 2);
13 SA(alignof(aligned_storage<8,4>::type) == 4);
14 SA(alignof(aligned_storage<8,8>::type) == 8);
15