struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-941015-1.c
bloba9d1d992e4852e1c178bb3b332b678321e63a252
1 /*
2 941015-1.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 int
12 foo1 (long long value)
14 register const long long constant = 0xc000000080000000LL;
16 if (value < constant)
17 return 1;
18 else
19 return 2;
22 int
23 foo2 (unsigned long long value)
25 register const unsigned long long constant = 0xc000000080000000LL;
27 if (value < constant)
28 return 1;
29 else
30 return 2;
33 void
34 testTortureExecute (void)
36 #if !defined(__SDCC_mcs51)
37 unsigned long long value = 0xc000000000000001LL;
38 int x, y;
40 x = foo1 (value);
41 y = foo2 (value);
42 if (x != y || x != 1)
43 ASSERT (0);
44 return;
45 #endif