struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-divconst-1.c
blobec0ff8a4ee39e11c9f602bb670c299758fd60df7
1 /*
2 divconst-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 typedef struct
13 unsigned a, b, c, d;
14 } t1;
16 void
17 f (t1 *ps)
19 ps->a = 10000;
20 ps->b = ps->a / 3;
21 ps->c = 10000;
22 ps->d = ps->c / 3;
25 void
26 testTortureExecute (void)
28 t1 s;
29 f (&s);
30 ASSERT(!(s.a != 10000 || s.b != 3333 || s.c != 10000 || s.d != 3333));
31 return;