struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-930518-1.c
blobb78c69b67c6b37fbfc93852db8db2e5551af1631
1 /*
2 930518-1.c from the execute part of the gcc torture suite.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 int bar = 0;
13 void
14 f (int *p)
16 int foo = 2;
18 while (foo > bar)
20 foo -= bar;
21 *p++ = foo;
22 bar = 1;
26 void
27 testTortureExecute (void)
29 int tab[2];
30 tab[0] = tab[1] = 0;
31 f (tab);
32 ASSERT(!(tab[0] != 2 || tab[1] != 1));
33 return;