struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-931004-4.c
blob466f899c1b740a4d90ce09c14eadb0c55de14e84
1 /*
2 931004-4.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 #include <stdarg.h>
15 struct tiny
17 short c;
20 f (int n, ...)
22 struct tiny x;
23 int i;
25 va_list ap;
26 va_start (ap,n);
27 for (i = 0; i < n; i++)
29 x = va_arg (ap,struct tiny);
30 if (x.c != i + 10)
31 ASSERT (0);
34 long x = va_arg (ap, long);
35 if (x != 123)
36 ASSERT (0);
38 va_end (ap);
40 #endif
42 void
43 testTortureExecute (void)
45 #if 0
46 struct tiny x[3];
47 x[0].c = 10;
48 x[1].c = 11;
49 x[2].c = 12;
50 f (3, x[0], x[1], x[2], (long) 123);
51 return;
52 #endif