libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / pr51628-18.c
blob03a04eff75cc29b24939a5eff91219330c73a26f
1 /* PR c/51628. */
2 /* { dg-do compile } */
3 /* { dg-options "-O" } */
5 void foo (int *);
7 int *
8 bar (int n, int k, void *ptr)
10 struct A
12 int c[k];
13 int x[n];
14 } __attribute__ ((packed, aligned (4)));
15 struct A *p = (struct A *) ptr;
17 int *p0, *p1;
18 p0 = p->x;
19 foo (p0);
20 p1 = &p->x[1];
21 foo (p1);
22 return &p->x[1];