libstdc++: Move gcc.gnu.org and sourceware.org links to https
[official-gcc.git] / gcc / testsuite / gcc.target / arm / va_list.c
blobb988a0d3365c5c5fe4b775f2ec9e079788c4e1d3
1 /* { dg-do run } */
2 /* { dg-require-effective-target arm_eabi } */
4 #include <stdarg.h>
5 #include <stddef.h>
7 /* AAPCS \S 7.1.4 requires that va_list match the structure shown
8 here */
9 typedef struct my_va_list
11 void *ap;
12 } my_va_list;
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;
24 return 0;