OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.target/] [arm/] [va_list.c] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 313 jeremybenn
/* { 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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.