libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / gnu23-tag-composite-4.c
blobf3cb7369d4a325dfe4ce8c2f2e2720e1a2b64041
1 /* { dg-do run } */
2 /* { dg-options "-O2 -std=gnu23" } */
4 // struct with variable size
8 int
9 foo ()
11 int n = 10;
12 struct s { char buf[n]; } s;
14 int m = 10;
15 struct s { char buf[m]; } t;
16 typeof(*(1 ? &s : &t)) u;
17 return sizeof(u.buf);
21 int main()
23 if (10 != foo())
24 __builtin_abort();
26 return 0;