struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug3482753.c
blob13932d5f8ba73234d5d2f3909a10f1f6c4be89b0
1 /*
2 bug3482753.c
3 */
5 #include <testfwk.h>
7 struct {char a;} x;
8 volatile char d = 7;
10 int f(void)
12 char t = d;
14 x.a = t;
15 t = x.a + 2;
16 d = t;
17 t = x.a + 3; /* bug: x.a was optimized to t, despite redefinition of t */
18 return t;
21 void testBug(void)
23 ASSERT(f() == 10);