1 // { dg-do compile { target c++11 } }
4 constexpr int foo() { return __alignof__(int); }
7 constexpr int fooT() { return __alignof__(T); }
10 constexpr int fooN() { return N; }
14 //with normal variables,
15 int a __attribute__((aligned(foo())));
16 int b __attribute__((aligned(fooT<int>())));
17 int c __attribute__((aligned(fooN<__alignof__(int)>())));
19 //with variables inside a template,
23 T a __attribute__((aligned(foo())));
24 T b __attribute__((aligned(fooT<T>())));
25 T c __attribute__((aligned(fooN<__alignof__(T)>())));
26 T d __attribute__((aligned(fooT<int>())));
27 T e __attribute__((aligned(fooN<__alignof__(int)>())));
37 struct __attribute__((aligned(foo()))) S0
43 struct __attribute__((aligned(fooT<int>()))) S1
51 struct __attribute__((aligned(foo()))) S2
59 struct __attribute__((aligned(fooT<T>()))) S3