struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-2175.c
blob6ee6343f9fb93c2e5c6583548d2b62bdb25aab37
1 /*
2 bug-2175.c
3 */
5 #include <testfwk.h>
7 void f(unsigned char u)
9 volatile unsigned char i = (unsigned char)((unsigned char)1 << (unsigned char)((unsigned char)u & (unsigned char)0xf));
11 ASSERT (i == 0x20);
14 void g(unsigned char u)
16 volatile unsigned char i = (unsigned char)((unsigned char)0x20 >> (unsigned char)((unsigned char)u & (unsigned char)0xf));
18 ASSERT (i == 1);
21 void testBug(void)
23 f(0x5);
24 g(0x5);