2 // Addition tests - mostly int's
4 /* bit types are not ANSI - so provide a way of disabling bit types
5 * if this file is used to test other compilers besides SDCC */
6 #define SUPPORT_BIT_TYPES 1
9 unsigned char success=0;
10 unsigned char failures=0;
11 unsigned char dummy=0;
14 unsigned int aint0 = 0;
15 unsigned int aint1 = 0;
16 unsigned int aint2 = 0;
17 unsigned int aint3 = 0;
18 unsigned char achar0 = 0;
19 unsigned char achar1 = 0;
20 unsigned char achar2 = 0;
21 unsigned char achar3 = 0;
22 unsigned char *acharP = 0;
49 void add_lit2uint(void)
62 aint0 = aint0 +1; // Should be an increment
66 for(aint1 = 0; aint1 < 100; aint1++)
74 void add_uint2uint (void)
77 aint1 = aint1 + aint0;
82 for(aint2 = 0; aint2<7; aint2++)
93 // aint2, aint3 can be anything.
95 void add_uint2uint2(void)
110 aint2 = aint1 + aint0;
114 aint3 = aint2 + aint1 + aint0;
130 aint3 = aint2 + aint1 + aint0;
137 #if SUPPORT_BIT_TYPES
156 bit3 = bit4+bit5+bit6+bit7+bit0;
162 /* add_bit2uchar(void) - assumes bit0 = 1, aint0 = 7 */
164 void add_bit2uchar(void)
177 void add_bit2uint(void)
189 /***********************************/
310 #if SUPPORT_BIT_TYPES