struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / scott-b.c
blob534253bd78d6d016e575e91ada717833e9af3fa4
1 /*
2 */
3 #include <testfwk.h>
5 unsigned char uchar0=0;
6 unsigned char uchar1=0;
7 unsigned char uchar2=0;
9 void inc(unsigned char k)
11 uchar0 = uchar0 + k;
14 void f1(void)
17 uchar2++;
20 void nested_call(unsigned char u)
23 f1();
24 uchar1 = uchar1 + u;
25 inc(uchar1);
28 // uchar1 = uchar1 + uchar0;
29 // uchar2 = uchar1 + k;
31 void
32 testB(void)
35 uchar0=1;
36 inc(uchar0);
37 ASSERT(uchar0 == 2);
39 uchar0 = 2;
40 uchar1 = 1;
41 uchar2 = 1;
42 nested_call(uchar2);
44 ASSERT(uchar0 == 4);