3 !!ORIGIN!! SDCC regression tests
4 !!LICENCE!! GPL, read COPYING.GPL
10 unsigned char success=0;
11 unsigned char failures=0;
12 unsigned char dummy=0;
14 #ifdef SUPPORT_BIT_TYPES
17 unsigned int uint0 = 0;
18 unsigned int uint1 = 0;
21 * BUG: if these aren't volatile, an overzealous optimizer or somthing
22 * wreaks havoc with the simple tests like "if(uchar != 3)failures++"
26 unsigned char uchar0 = 0;
27 unsigned char uchar1 = 0;
28 unsigned char uchar2 = 0;
30 volatile unsigned char uchar0 = 0;
31 volatile unsigned char uchar1 = 0;
32 volatile unsigned char uchar2 = 0;
35 #ifdef NO_IMPLICIT_FUNCPTR_CONV
38 unsigned char (*pcfunc)(void);
42 unsigned char (*pcfunc)();
60 unsigned char call2(void)
76 for(i = 0; i < 3; i++) {
81 #ifdef NO_IMPLICIT_FUNCPTR_CONV
82 void docall2( void(*pf)(void) )
84 void docall2( void(*pf)() )
88 for(i = 0; i < 2; i++) {
124 uchar2 = (*pcfunc)();
128 uchar2 += (pcfunc)();
133 printf("failures: %d\n",failures);