OSDN Git Service

Index: gcc/ChangeLog
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / titype-1.c
1 /* { dg-do run } */
2
3 /* Not all platforms support TImode integers.  */
4 #if defined(__LP64__) && !defined(__hppa__)
5 typedef int TItype __attribute__ ((mode (TI)));
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 }