struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug1464657.c
blob88668f74e61baf6f686370a0c83eed5a63c93f9a
1 /*
2 bug1464657.c
3 */
5 #include <testfwk.h>
7 static void f1(void)
11 static short f2(void)
13 return 0;
16 static unsigned char f3(unsigned char a)
18 return a+5;
21 unsigned char var;
23 void f()
25 switch (var) {
26 case 0:
27 f1();
28 break;
29 case 1:
30 f1();
31 break;
32 case 2:
33 var++;
34 f1();
35 break;
36 case 4:
37 f1();
38 break;
39 case 5:
40 break;
41 case 7:
42 f1();
43 break;
44 case 6:
45 f1();
46 break;
47 case 8:
48 f1();
49 break;
50 case 9:
51 f1();
52 break;
53 case 12:
55 unsigned char nc;
56 unsigned short b = f2();
57 unsigned char nb = f3(b);
58 var = f3(b);
59 nc = f3(nb);
61 break;
65 void test_Peephole251(void)
67 var = 12;
68 f();
69 ASSERT (var==5);