Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc / support / regression / tests / gcc-torture-execute-920501-8.c
blob69bc6420a75269113cb800b7dca1f014225985f1
1 /*
2 920501-8.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 double is fully supported!
12 #if 0
13 #include <string.h>
15 #include <stdio.h>
16 #include <stdarg.h>
18 char buf[50];
19 int
20 va (int a, double b, int c, ...)
22 va_list ap;
23 int d, e, f, g, h, i, j, k, l, m, n, o, p;
24 va_start (ap, c);
26 d = va_arg (ap, int);
27 e = va_arg (ap, int);
28 f = va_arg (ap, int);
29 g = va_arg (ap, int);
30 h = va_arg (ap, int);
31 i = va_arg (ap, int);
32 j = va_arg (ap, int);
33 k = va_arg (ap, int);
34 l = va_arg (ap, int);
35 m = va_arg (ap, int);
36 n = va_arg (ap, int);
37 o = va_arg (ap, int);
38 p = va_arg (ap, int);
40 sprintf (buf,
41 "%d,%f,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",
42 a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p);
43 va_end (ap);
45 #endif
47 void
48 testTortureExecute (void)
50 #if 0
51 va (1, 1.0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
52 if (strcmp ("1,1.000000,2,3,4,5,6,7,8,9,10,11,12,13,14,15", buf))
53 ASSERT(0);
54 return;
55 #endif