OSDN Git Service

2012-06-14 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / ext / tmplattr2.C
1 // PR c++/17743
2
3 template <unsigned Len, unsigned Align>
4 struct aligned_storage
5 {
6   typedef char type[Len] __attribute__((aligned((Align))));
7 };
8
9 template<typename T>
10 struct X
11 {
12   typename aligned_storage<sizeof(T),__alignof(T)>::type data;
13 };
14
15 template<bool> struct StaticAssert;
16 template<> struct StaticAssert<true> {};
17
18 StaticAssert<__alignof (X<double>) == __alignof (double)> dummy;