1 /*
2    931004-2.c from the execute part of the gcc torture suite.
3  */
4 
5 #include <testfwk.h>
6 
7 #ifdef __SDCC
8 #pragma std_c99
9 #endif
10 
11 // Todo: Enable when sdcc supports struct passing!
12 #if 0
13 #include <stdarg.h>
14 
15 struct tiny
16 {
17   int c;
18 };
19 
20 f (int n, ...)
21 {
22   struct tiny x;
23   int i;
24 
25   va_list ap;
26   va_start (ap,n);
27   for (i = 0; i < n; i++)
28     {
29       x = va_arg (ap,struct tiny);
30       if (x.c != i + 10)
31 	ASSERT (0);
32     }
33   {
34     long x = va_arg (ap, long);
35     if (x != 123)
36       ASSERT (0);
37   }
38   va_end (ap);
39 }
40 #endif
41 
42 void
testTortureExecute(void)43 testTortureExecute (void)
44 {
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   exit(0);
52 #endif
53 }
54 
55