struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-931004-9.c
blob9067ac7138b14c8e559330a5c8cba4c05c548b5d
1 /*
2 931004-9.c from the execute part of the gcc torture suite.
3 */
5 #include <testfwk.h>
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
11 // Todo: Enable when sdcc supports struct passing!
12 #if 0
13 struct tiny
15 char c;
16 char d;
19 f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
21 if (x.c != 10)
22 ASSERT (0);
23 if (x.d != 20)
24 ASSERT (0);
26 if (y.c != 11)
27 ASSERT (0);
28 if (y.d != 21)
29 ASSERT (0);
31 if (z.c != 12)
32 ASSERT (0);
33 if (z.d != 22)
34 ASSERT (0);
36 if (l != 123)
37 ASSERT (0);
39 #endif
41 void
42 testTortureExecute (void)
44 #if 0
45 struct tiny x[3];
46 x[0].c = 10;
47 x[1].c = 11;
48 x[2].c = 12;
49 x[0].d = 20;
50 x[1].d = 21;
51 x[2].d = 22;
52 f (3, x[0], x[1], x[2], (long) 123);
53 return;
54 #endif