PR c++/17743
[official-gcc.git] / gcc / testsuite / g++.dg / ext / tmplattr3.C
blob51f5daf19b1576941737312cf46bd0a725a3a4cb
1 // PR c++/17743
3 template<typename T>
4 struct X {
5   typedef char layout_type[sizeof(T)]
6   __attribute ((aligned(__alignof(double))));
7   layout_type data;
8 };
10 template<typename T>
11 struct Y {
12   typedef char layout_type[sizeof(T)]
13   __attribute ((aligned(__alignof(T))));
14   layout_type data;
17 template<bool> struct StaticAssert;
18 template<> struct StaticAssert<true> {};
20 StaticAssert<__alignof(X<double>) == __alignof(double)> d1;
21 StaticAssert<__alignof(Y<double>) == __alignof(double)> d2;