c++: Implement for namespace statics CWG 2867 - Order of initialization for structure...
[official-gcc.git] / gcc / testsuite / gcc.dg / enum-alias-2.c
blobf107968435cf2eee1f75681cf5720705e01a3ef6
1 /* { dg-do run } */
2 /* { dg-options "-O2" } */
4 typedef int A;
6 void* foo(void* a, void *b, void *c, void *d)
8 *(A**)a = c;
11 typedef enum E B;
12 enum E { E1 = -1, E2 = 0, E3 = 1, MAX = __INT_MAX__ };
13 *(B**)b = d;
16 return *(A**)a;
19 int main()
21 A *a, b, c;
22 if (&c != (A*)foo(&a, &a, &b, &c))
23 __builtin_abort();