]>
Commit | Line | Data |
---|---|---|
0771e863 | 1 | /* { dg-do run } */ |
d560b0aa EB |
2 | |
3 | /* Not all platforms support TImode integers. */ | |
78feaa1f | 4 | #if (defined(__LP64__) && !defined(__hppa__)) || defined(_WIN64) || defined(__SPU__) |
de256a45 | 5 | typedef int TItype __attribute__ ((mode (TI))); |
d560b0aa EB |
6 | #else |
7 | typedef long TItype; | |
8 | #endif | |
9 | ||
10 | #include <stdarg.h> | |
11 | ||
12 | extern void abort(void); | |
13 | ||
14 | ||
15 | void foo(int i, ...) | |
16 | { | |
17 | TItype q; | |
18 | va_list va; | |
19 | ||
20 | va_start(va, i); | |
21 | q = va_arg(va, TItype); | |
22 | va_end(va); | |
23 | ||
24 | if (q != 5) | |
25 | abort(); | |
26 | } | |
27 | ||
28 | int main(void) | |
29 | { | |
30 | TItype q = 5; | |
31 | ||
32 | foo(1, q); | |
33 | return 0; | |
34 | } |