1 /* __builtin_va_arg_pack () builtin tests. */
5 extern void abort (void);
9 void *v3
= (void *) &v2
;
10 struct A
{ char c
[16]; } v4
= { "foo" };
15 __attribute__ ((noinline
)) int
16 foo1 (int x
, int y
, ...)
26 if (x
< 0 || x
>= 20 || seen
[x
])
38 if (i
!= 9 || v1
!= 9)
40 a
= va_arg (ap
, struct A
);
41 if (__builtin_memcmp (a
.c
, v4
.c
, sizeof (a
.c
)) != 0)
43 v
= (void *) va_arg (ap
, struct A
*);
44 if (v
!= (void *) &v4
)
46 l
= va_arg (ap
, long int);
47 if (l
!= 3 || v2
!= 4)
51 ld
= va_arg (ap
, long double);
52 if (ld
!= 41 || v5
!= ld
)
57 v
= va_arg (ap
, void *);
70 __attribute__ ((noinline
)) int
71 foo2 (int x
, int y
, ...)
80 if (x
< 0 || x
>= 20 || seen
[x
])
90 ld
= va_arg (ap
, long double);
91 if (ld
!= 41 || v5
!= 40)
93 a
= va_arg (ap
, struct A
);
94 if (__builtin_memcmp (a
.c
, v4
.c
, sizeof (a
.c
)) != 0)
96 b
= va_arg (ap
, struct A
);
97 if (__builtin_memcmp (b
.c
, v4
.c
, sizeof (b
.c
)) != 0)
99 v
= va_arg (ap
, void *);
102 ll
= va_arg (ap
, long long int);
115 __attribute__ ((noinline
)) int
121 extern inline __attribute__ ((always_inline
, gnu_inline
)) int
125 return foo1 (x
, foo3 (), 5, __builtin_va_arg_pack ());
126 return foo2 (x
, foo3 () + 4, __builtin_va_arg_pack ());
132 if (bar (0, ++v1
, v4
, &v4
, v2
++) != 0)
134 if (bar (1, ++v5
, 8, v3
) != 1)
138 if (bar (v1
+ 2) != 19)
140 if (bar (v1
+ 3, v5
--, v4
, v4
, v3
, 16LL) != 20)