struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20030105-1.c
blob4d58358214604d93e11de6b8e02c76dd52e884df
1 /*
2 20030105-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 int
12 foo ()
14 const int a[8] = { 0, 1, 2, 3, 4, 5, 6, 7 };
15 int i, sum;
17 sum = 0;
18 for (i = 0; i < sizeof (a) / sizeof (*a); i++)
19 sum += a[i];
21 return sum;
24 void
25 testTortureExecute (void)
27 if (foo () != 28)
28 ASSERT (0);
29 return;