gcc/testsuite/g++.dg/cpp0x/constexpr-attribute4.C
raw| 1 | // Verify we correctly handle the non-dependent attribute expression which |
| 2 | // which we used to reject due to double folding. |
| 3 | // { dg-do compile { target { c++11 } } } |
| 4 | |
| 5 | struct A { |
| 6 | constexpr int f() const { return __alignof__(int); }; |
| 7 | }; |
| 8 | |
| 9 | template<class...> |
| 10 | void f() { |
| 11 | int a __attribute__((aligned(A{}.f()))); |
| 12 | } |
| 13 | |
| 14 | template void f(); |