struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug1426356.c
blob01caa6ae3eb5ed2e3c76e11c8aa9b07b1002e014
1 /*
2 bug1426356.c
3 */
5 #include <testfwk.h>
7 const union pu {
8 unsigned char t1;
9 unsigned char t2;
10 } tst[2] = {{ 1 }, { 2 }};
12 void
13 test_1426356(void)
15 ASSERT( tst[0].t1 == 1 );
16 ASSERT( tst[0].t2 == 1 );
17 ASSERT( tst[1].t1 == 2 );
18 ASSERT( tst[1].t2 == 2 );