libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / pr108657.c
blob37d0b8e863f916f30692b0a10da37b42c1715756
1 /* PR tree-optimization/108657 */
2 /* { dg-do run } */
3 /* { dg-options "-O3 -ftrivial-auto-var-init=zero" } */
5 int c, e, f;
6 static int *d = &c;
8 __attribute__((noipa)) void
9 foo (void)
11 if (c != 1)
12 __builtin_abort ();
15 int
16 main ()
18 for (c = 1; c >= 0; c--)
20 e = 0;
21 for (int j = 0; j <= 2; j++)
23 short k[1];
24 if (e)
25 break;
26 e ^= f;
29 *d = 1;
30 foo ();