struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20051110-2.c
blobda49caf3c6a9c07a03c8a72384eaee1ff591bb80
1 /*
2 20051110-2.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 void add_unwind_adjustsp (long);
13 unsigned char bytes[5];
15 int flag;
17 void
18 add_unwind_adjustsp (long offset)
20 int n;
21 unsigned long o;
23 o = (long) ((offset - 0x204) >> 2);
25 n = 0;
29 bytes[n] = o & 0x7f;
30 o >>= 7;
31 if (o)
33 bytes[n] |= 0x80;
34 if (flag)
35 goto a;
37 n++;
39 while (o);
42 void testTortureExecute(void)
44 add_unwind_adjustsp (4132);
45 if (bytes[0] != 0x88 || bytes[1] != 0x07)
46 ASSERT (0);
47 return;