struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-920908-1.c
blobf6902e898c1da152b1cce7c43bd79c6d1389820d
1 /*
2 920908-1.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 returning struct!
12 #if 0
13 /* REPRODUCED:RUN:SIGNAL MACHINE:mips OPTIONS: */
15 #include <stdarg.h>
17 typedef struct{int A;}T;
19 T f(int x,...)
21 va_list ap;
22 T X;
23 va_start(ap,x);
24 X=va_arg(ap,T);
25 if(X.A!=10)abort();
26 X=va_arg(ap,T);
27 if(X.A!=20)abort();
28 va_end(ap);
29 return X;
31 #endif
33 void
34 testTortureExecute (void)
36 #if 0
37 T X,Y;
38 int i;
39 X.A=10;
40 Y.A=20;
41 f(2,X,Y);
42 return;
43 #endif