struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-20000403-1.c
blobd7b6002cd7adf4aa3ab1590d701198fa43dd762b
1 /*
2 20000403-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 extern unsigned long aa[], bb[];
13 int seqgt (unsigned long a, unsigned short win, unsigned long b);
15 int seqgt2 (unsigned long a, unsigned short win, unsigned long b);
17 void
18 testTortureExecute (void)
20 if (! seqgt (*aa, 0x1000, *bb) || ! seqgt2 (*aa, 0x1000, *bb))
21 ASSERT (0);
23 return;
26 int
27 seqgt (unsigned long a, unsigned short win, unsigned long b)
29 return (long) ((a + win) - b) > 0;
32 int
33 seqgt2 (unsigned long a, unsigned short win, unsigned long b)
35 long l = ((a + win) - b);
36 return l > 0;
39 unsigned long aa[] = { (1UL << (sizeof (long) * 8 - 1)) - 0xfff };
40 unsigned long bb[] = { (1UL << (sizeof (long) * 8 - 1)) - 0xfff };