libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / enum-alias-3.c
blob322c8d82952cfc34bc63fccf6a25e6b56fa2f895
1 /* { dg-do run } */
2 /* { dg-require-effective-target lto } */
3 /* { dg-options "-O2 -flto" } */
5 typedef int *A;
7 void* foo(void* a, void *b, void *c, void *d)
9 *(A**)a = c;
11 typedef enum E *B;
12 enum E { E1 = -1, E2 = 0, E3 = 1 };
14 *(B**)b = d;
17 return *(A**)a;
20 int main()
22 A *a, b, c;
23 if (&c != (A*)foo(&a, &a, &b, &c))
24 __builtin_abort();