struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug1838000.c
blobc506c32d5f49f5d6a7ede38a10591382e95fe663
1 /*
2 bug 1838000
3 */
5 #include <testfwk.h>
7 typedef struct { char b:1; } t;
8 t glbl = { 0 };
9 t _STATMEM * gp = &glbl;
11 void func(char _AUTOMEM *p)
13 *p++ = gp->b ? 'A' : 'B';
14 *p = 'C';
17 void
18 testBug(void)
20 char x[2];
21 func(x);
22 ASSERT(x[0]=='B');