libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / nested-vla-2.c
blob294b01d370e44cc5fd417678d391d077d0c0f39c
1 /* { dg-do run } */
2 /* { dg-options "-std=gnu99" } */
3 /* { dg-require-effective-target trampolines } */
6 int main()
8 int n = 1;
10 char tmp[2] = { 0 };
11 typeof(char (*)[++n]) bar(void) { return &tmp; }
13 if (2 != n)
14 __builtin_abort();
16 if (2 != sizeof(*bar()))
17 __builtin_abort();
19 if (2 != n)
20 __builtin_abort();
22 n = 1;
24 typeof(char (*)[++n]) (*bar2)(void) = bar;
26 if (2 != n)
27 __builtin_abort();
29 if (2 != sizeof(*(*bar2)()))
30 __builtin_abort();
32 if (2 != n)
33 __builtin_abort();