struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / bug-2436.c
blob20bd6701d081ebda151f45e078b6bccdc0d0f399
1 /*
2 bug-2436.c
3 */
5 #include <testfwk.h>
7 char *q (char *q0, char *q1)
9 return q0[0] > q1[0] ? q0 : q1;
12 void *b (char *b0, char *b1, char *b2)
14 char *a = b0[0] > b1[0] ? b0 : b1;
15 return a[0] > b2[0] ? a : b2;
18 char a0[2] = {'6', 0};
19 char a1[2] = {'3', 0};
20 char a2[2] = {'9', 0};
21 char a3[2] = {'0', 0};
23 char *foo (void)
25 return q(a0, b(a1, a2, a3));
28 void testBug (void)
30 ASSERT (foo () == a2);