struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug3130806.c
blobf5699edfd07516b37ad0ed57d76ce7a5505f88f9
1 /*
2 bug3130806.c
3 */
5 #include <testfwk.h>
7 char foo[2];
9 void blah(char *m0, void *m1)
11 *m0 = 1;
12 m1;
15 void dostuff(unsigned char* buffer, unsigned char size)
17 unsigned char x = 0;
18 unsigned char y = 0;
20 while (x < 1)
22 y = (size - x);
24 if (y == 2)
25 return;
27 blah(&foo[x], &buffer[y]);
29 x += y;
33 void testBug(void)
35 unsigned char buffer[2];
36 dostuff(buffer, 2);
37 ASSERT(foo[0] == 0);