struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug1962613.c
blobcbb01ee1a92b1b8ff16c208c043565256ef57398
1 /*
2 bug1962613.c
3 */
5 #include <testfwk.h>
7 struct b {
8 char b0;
9 char b1;
12 struct a {
13 const struct b *q[2];
14 const char *r[2];
17 const struct b c0[3] = {
18 {000, 001}, {010, 011}, {020, 021}
21 const struct b c1[3] = {
22 {100, 101}, {110, 111}, {120, 121}
25 const char k0[3] = { 50, 51, 52 };
26 const char k1[3] = { 60, 61, 62 };
28 const struct a x = {
29 {c0, c1}, {k0, k1}
32 void testBug(void)
34 ASSERT (x.q[1][2].b1 == 121);
35 ASSERT (x.r[1][2] == 62);