1 // { dg-do compile { target init_priority } } 2 // { dg-require-effective-target c++11 } 3 4 struct t { t(); }; 5 6 constexpr int prio = 123; 7 constexpr int size = 8; 8 constexpr int pos = 1; 9 enum A { zero = 0, one, two }; 10 __attribute__((init_priority(prio))) t a; 11 12 enum class E1 : int { 13 first = 101, 14 second, 15 third, 16 }; 17 __attribute__((init_priority(E1::second))) t b; // Should not compile? 18 19 enum E2 { 20 E2_first = 141, 21 E2_second, 22 E2_third, 23 }; 24 __attribute__((init_priority(E2_second))) t c; 25 26 void* my_calloc(unsigned, unsigned) __attribute__((alloc_size(pos,two))); 27 void* my_realloc(void*, unsigned) __attribute__((alloc_size(two))); 28 29 typedef char vec __attribute__((vector_size(size))); 30 31 void f(char*) __attribute__((nonnull(pos))); 32 33 char g __attribute__((aligned(size))); 34