2 divmod-1.c from the execute part of the gcc torture tests.
24 div3 (signed char x
, signed char y
)
30 div4 (signed short x
, signed short y
)
48 mod3 (signed char x
, signed char y
)
54 mod4 (signed short x
, signed short y
)
59 #ifndef __SDCC_pdk14 // Lack of memory
60 #if !(defined (__SDCC_pdk15) && defined(__SDCC_STACK_AUTO)) // Lack of code memory
62 mod5 (signed long x
, signed long y
)
68 mod6 (unsigned long x
, unsigned long y
)
76 testTortureExecute (void)
78 ASSERT(!(div1 (-(1 << 7)) != 1 << 7));
79 ASSERT(!(div2 (-(1 << 15)) != 1 << 15));
80 ASSERT(!(div3 (-(1 << 7), -1) != 1 << 7));
81 ASSERT(!(div4 (-(1 << 15), -1) != 1 << 15));
82 ASSERT(!(mod1 (-(1 << 7)) != 0));
83 ASSERT(!(mod2 (-(1 << 15)) != 0));
84 ASSERT(!(mod3 (-(1 << 7), -1) != 0));
85 ASSERT(!(mod4 (-(1 << 15), -1) != 0));
86 #ifndef __SDCC_pdk14 // Lack of memory
87 #if !(defined (__SDCC_pdk15) && defined(__SDCC_STACK_AUTO)) // Lack of code memory
88 ASSERT(!(mod5 (0x50000000, 2) != 0));
89 ASSERT(!(mod6 (0x50000000, 2) != 0));