struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-931004-10.c
blob30138504329813d658c726dbea08d43d39470be6
1 /*
2 931004-10.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!
12 #if 0
13 #include <stdarg.h>
15 struct tiny
17 char c;
18 char d;
21 void f (int n, ...)
23 struct tiny x;
24 int i;
26 va_list ap;
27 va_start (ap,n);
28 for (i = 0; i < n; i++)
30 x = va_arg (ap,struct tiny);
31 if (x.c != i + 10)
32 ASSERT (0);
33 if (x.d != i + 20)
34 ASSERT (0);
37 long x = va_arg (ap, long);
38 if (x != 123)
39 ASSERT (0);
41 va_end (ap);
43 #endif
45 void
46 testTortureExecute (void)
48 #if 0
49 struct tiny x[3];
50 x[0].c = 10;
51 x[1].c = 11;
52 x[2].c = 12;
53 x[0].d = 20;
54 x[1].d = 21;
55 x[2].d = 22;
56 f (3, x[0], x[1], x[2], (long) 123);
57 return;
58 #endif