OSDN Git Service

* gcc.target/arm/thumb-andsi.c: Correct dg-options and add
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / arm / va_list.c
1 /* { dg-do run } */
2 /* { dg-require-effective-target arm_eabi } */
3
4 #include <stdarg.h>
5 #include <stddef.h>
6
7 /* AAPCS \S 7.1.4 requires that va_list match the structure shown
8    here */
9 typedef struct my_va_list 
10 {
11   void *ap;
12 } my_va_list;
13
14 int 
15 main () {
16   if (sizeof (va_list) != sizeof (my_va_list))
17     return 1;
18   /* This check confirms both that "va_list" has a member named "__ap"
19      and that it is located at the correct position.  */
20   if (offsetof (va_list, __ap) 
21       != offsetof (my_va_list, ap))
22     return 2;
23
24   return 0;
25 }