1 /* { dg-do run } */
2
3 #include <stdarg.h>
4 #include "dfp-dbg.h"
5
6 void
f(int a,...)7 f (int a, ...)
8 {
9 va_list ap;
10 if (a != 0)
11 FAILURE
12 va_start (ap, a);
13 if (va_arg (ap, _Decimal128) != 1.2DL)
14 FAILURE
15 if (va_arg (ap, _Decimal128) != 2.34DL)
16 FAILURE
17 if (va_arg (ap, _Decimal128) != 3.456DL)
18 FAILURE
19 if (va_arg (ap, _Decimal128) != 4.567DL)
20 FAILURE
21 if (va_arg (ap, double) != 5.125)
22 FAILURE
23 va_end (ap);
24 }
25
26 int
main(void)27 main (void)
28 {
29 f (0, 1.2DL, 2.34DL, 3.456DL, 4.567DL, 5.125);
30
31 FINISH
32 }
33