Dead
[official-gcc.git] / gomp-20050608-branch / gcc / testsuite / gcc.dg / dfp / func-vararg-size0.c
blobdc94709c108d4871a392c2d0ecae84812f6a471f
1 /* { dg-options "-std=gnu99" } */
3 /* C99 6.5.2.2 Function calls. */
5 #include <stdarg.h>
7 extern void abort (void);
9 struct S1
11 struct
13 _Decimal64 e;
14 } b[0];
17 /* Test handling vararg parameters whose size is 0. */
19 int check_var(int z,...)
21 double d;
22 struct S1 s1;
23 long long result;
24 va_list ap;
25 va_start (ap, z);
26 d = va_arg (ap, double);
27 s1 = va_arg (ap, struct S1);
28 result = va_arg (ap, long long);
29 va_end (ap);
30 return (result == 2LL);
34 int
35 main ()
37 struct S1 s1;
38 struct S1 a1[5];
40 if (check_var(5, 1.0, s1, 2LL, a1[2], a1[2]) == 0)
41 abort ();
43 return 0;