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