struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20010209-1.c
blobcda61cb49a1116686dd2200e8721c22042929c18
1 /*
2 20010209-1.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 // TODO: Enable when sdcc supports VLA!
13 #if 0
14 int b;
15 int foo (void)
17 int x[b];
18 int bar (int t[b])
20 int i;
21 for (i = 0; i < b; i++)
22 t[i] = i + (i > 0 ? t[i-1] : 0);
23 return t[b-1];
25 return bar (x);
27 #endif
29 void
30 testTortureExecute (void)
32 #if 0
33 b = 6;
34 if (foo () != 15)
35 ASSERT (0);
36 return;
37 #endif