2 20020201-1.c from the execute part of the gcc torture suite.
11 /* Test whether division by constant works properly. */
14 unsigned short sx
= 14;
16 unsigned long lx
= 28;
17 unsigned long long Lx
= 35;
20 testTortureExecute (void)
22 #ifndef __SDCC_pdk14 // Lack of memory
26 #if !(defined (__SDCC_pdk15) && defined(__SDCC_STACK_AUTO)) // Lack of code memory
28 unsigned long long Ly
;
31 cy
= cx
/ 6; ASSERT (cy
== 1);
32 cy
= cx
% 6; ASSERT (cy
== 1);
34 sy
= sx
/ 6; ASSERT (sy
== 2);
35 sy
= sx
% 6; ASSERT (sy
== 2);
37 iy
= ix
/ 6; ASSERT (iy
== 3);
38 iy
= ix
% 6; ASSERT (iy
== 3);
39 #if !(defined (__SDCC_pdk15) && defined(__SDCC_STACK_AUTO)) // Lack of code memory
40 ly
= lx
/ 6; ASSERT (ly
== 4);
41 ly
= lx
% 6; ASSERT (ly
== 4);
43 Ly
= Lx
/ 6; ASSERT (Ly
== 5);
44 Ly
= Lx
% 6; ASSERT (Ly
== 5);