struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug3475990.c
blob52e50fc576cd8754b600385159ac351a8e6817d5
1 /* Due to the specific structure of the control-flow graph there was a segmentation fault in iCode generatuion. */
3 #include <testfwk.h>
5 void set_b(void)
9 #if defined(__SDCC) && !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15) // Weird issue in pdk14 / pdk15
10 __addressmod set_b b;
11 #else
12 #define b
13 #endif
15 int a0, a1, a2;
16 b int b0;
17 int b2, b1;
18 int x0, x1;
20 int f(void)
22 switch(x0)
24 case 0:
25 if(a0 && b0)
28 else
30 x0++;
32 return(b2);
33 default:
34 return(x1);
36 return(a2);
39 void testBug(void)