2 pr85582-2.c from the execute part of the gcc torture tests.
12 typedef unsigned long long U
;
33 testTortureExecute (void)
35 #if !defined(__SDCC_pdk13) && !defined(__SDCC_pdk14) // Lack of data memory
36 U a
= (U
) 1 << (sizeof (U
) * CHAR_BIT
- 7);
37 if (f1 (a
, 5) != ((U
) 1 << (sizeof (S
) * CHAR_BIT
- 3)))
39 S b
= (U
) 0x101 << (sizeof (S
) * CHAR_BIT
/ 2 - 7);
40 if (f1 (b
, sizeof (S
) * CHAR_BIT
/ 2) != (U
) 0x101 << (sizeof (S
) * CHAR_BIT
- 7))
42 if (f1 (b
, sizeof (S
) * CHAR_BIT
/ 2 + 2) != (U
) 0x101 << (sizeof (S
) * CHAR_BIT
- 5))
44 S c
= (U
) 1 << (sizeof (S
) * CHAR_BIT
- 1);
45 if ((U
) f2 (c
, 5) != ((U
) 0x1f << (sizeof (S
) * CHAR_BIT
- 5)))
47 if ((U
) f2 (c
, sizeof (S
) * CHAR_BIT
/ 2) != ((U
) -1 << (sizeof (S
) * CHAR_BIT
/ 2 - 1)))
49 if ((U
) f2 (c
, sizeof (S
) * CHAR_BIT
/ 2 + 2) != ((U
) -1 << (sizeof (S
) * CHAR_BIT
/ 2 - 3)))
51 U d
= (U
) 1 << (sizeof (S
) * CHAR_BIT
- 1);
52 if (f3 (c
, 5) != ((U
) 0x1 << (sizeof (S
) * CHAR_BIT
- 5)))
54 if (f3 (c
, sizeof (S
) * CHAR_BIT
/ 2) != ((U
) 1 << (sizeof (S
) * CHAR_BIT
/ 2 - 1)))
56 if (f3 (c
, sizeof (S
) * CHAR_BIT
/ 2 + 2) != ((U
) 1 << (sizeof (S
) * CHAR_BIT
/ 2 - 3)))