struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-2716.c
blobeef1bcf013b0c811915c02e0e7284745d1c48989
1 /* bug-2716.c
2 */
4 #include <testfwk.h>
6 struct s
8 unsigned int i;
9 };
11 struct s *p;
13 int i, j;
15 int g(void)
17 ASSERT(0);
19 return(0);
22 int f(void)
24 int a = i;
25 int b = j;
27 if(p->i & 4) /* This bit test used the wrong byte of p->i*/
28 g();
30 return(a + b);
33 void testBug(void)
35 struct s s;
36 s.i = 0xff00;
37 p = &s;
38 f();