struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-cmpsi-1.c
blob8dc06d4c9ff0439c43e6715576f592d7e708e379
1 /*
2 cmpsi-1.c from the execute part of the gcc torture tests.
3 */
5 #include <testfwk.h>
7 void dummy (void) {}
9 int
10 f1 (unsigned int x, unsigned int y)
12 if (x == 0)
13 dummy ();
14 x -= y;
15 /* 0xfffffff2 < 0x80000000? */
16 ASSERT(!(x < ~(~(unsigned int) 0 >> 1)));
17 return x;
20 int
21 f2 (unsigned long int x, unsigned long int y)
23 if (x == 0)
24 dummy ();
25 x -= y;
26 /* 0xfffffff2 < 0x80000000? */
27 ASSERT(!(x < ~(~(unsigned long int) 0 >> 1)));
28 return x;
31 void
32 testTortureExecute (void)
34 /* 0x7ffffff3 0x80000001 */
35 f1 ((~(unsigned int) 0 >> 1) - 12, ~(~(unsigned int) 0 >> 1) + 1);
36 f2 ((~(unsigned long int) 0 >> 1) - 12, ~(~(unsigned long int) 0 >> 1) + 1);
37 return;