struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20000717-3.c
blob56c0b63254fc2c605fb52d994a048616f2e80f21
1 /*
2 20000717-3.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 c = -1;
13 int
14 foo (int *p)
16 int x;
17 int a;
19 a = p[0];
20 x = a + 5;
21 a = c;
22 p[0] = x - 15;
23 return a;
26 void
27 testTortureExecute (void)
29 int b = 1;
30 int a = foo(&b);
32 ASSERT(!(a != -1 || b != (1 + 5 - 15)));
34 return;