2018-04-09 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / titype-1.c
blobef860b90ac0a65bd9b25d2218db6e5ecf1a6fd4a
1 /* { dg-do run } */
3 /* Not all platforms support TImode integers. */
4 #if (defined(__LP64__) && !defined(__hppa__)) || defined(_WIN64) || defined(__SPU__)
5 typedef int TItype __attribute__ ((mode (TI)));
6 #else
7 typedef long TItype;
8 #endif
10 #include <stdarg.h>
12 extern void abort(void);
15 void foo(int i, ...)
17 TItype q;
18 va_list va;
20 va_start(va, i);
21 q = va_arg(va, TItype);
22 va_end(va);
24 if (q != 5)
25 abort();
28 int main(void)
30 TItype q = 5;
32 foo(1, q);
33 return 0;