2 stdarg-3.c from the execute part of the gcc torture tests.
11 #pragma disable_warning 93 // Using float for double.
15 #if !defined( __SDCC_pdk14) && !defined(__SDCC_pdk15) // Lack of memory
20 struct S1
{ int i
; double d
; int j
; double e
; } s1
;
21 struct S2
{ double d
; long i
; } s2
;
36 x
= va_arg (ap
, long);
46 d
= va_arg (ap
, double);
58 x
= va_arg (ap
, long);
72 d
= va_arg (ap
, double);
79 SDCC cannot assign aggregates yet
.
86 s1
= va_arg (ap
, struct S1
);
96 s2
= va_arg (ap
, struct S2
);
108 s1
= va_arg (ap
, struct S1
);
122 s2
= va_arg (ap
, struct S2
);
123 y
= va_arg (ap
, int);
132 testTortureExecute (void)
134 #if !defined( __SDCC_pdk14) && !defined(__SDCC_pdk15) // Lack of memory
138 f1 (7, 1L, 2L, 3L, 5L, 7L, 9L, 11L, 13L);
141 f2 (6, 1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0);
145 if (bar_arg
!= 1L || x
!= 1L)
148 if (bar_arg
!= 21 || d
!= 17.0)
151 // SDCC cannot pass structures or assign aggregates yet.
160 if (s1
.i
!= 131 || s1
.j
!= 254 || s1
.d
!= 15.0 || s1
.e
!= 178.0)
163 if (s1
.i
!= 131 || s1
.j
!= 251 || s1
.d
!= 15.0 || s1
.e
!= 191.0)
170 if (s2
.i
!= 257 || s2
.d
!= 176.0)
173 if (s2
.i
!= 138 || s2
.d
!= 16.0)
176 if (s1
.i
!= 131 || s1
.j
!= 254 || s1
.d
!= 15.0 || s1
.e
!= 178.0)
181 if (s2
.i
!= 257 || s2
.d
!= 176.0)