gcc/testsuite/g++.dg/ext/attr-type1.C
raw| 1 | // PR c++/90750 |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | template <typename> struct S |
| 5 | { |
| 6 | static const int b = 64; |
| 7 | }; |
| 8 | |
| 9 | template <typename a> struct T: S<a> |
| 10 | { |
| 11 | using A = S<a>; |
| 12 | using A::b; |
| 13 | char* __attribute__((aligned(b))) c; |
| 14 | }; |
| 15 | |
| 16 | T<int> t; |
| 17 | |
| 18 | #define SA(X) static_assert (X,#X) |
| 19 | SA (alignof(T<int>) == S<int>::b); |