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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [x86_64/] [abi/] [callabi/] [vaarg-4a.c] - Blame information for rev 328

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 328 jeremybenn
/* Test for cross x86_64<->w64 abi va_list calls.  */
2
/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
3
/* { dg-options "-O2 -mabi=ms -std=gnu99 -fno-builtin" } */
4
/* { dg-additional-sources "vaarg-4b.c" } */
5
 
6
extern __SIZE_TYPE__ __attribute__ ((sysv_abi)) strlen (const char *);
7
extern int __attribute__ ((sysv_abi)) sprintf (char *,const char *, ...);
8
extern void __attribute__ ((sysv_abi)) abort (void);
9
 
10
extern void do_cpy (char *, ...);
11
 
12
int __attribute__ ((sysv_abi))
13
main ()
14
{
15
  char s[256];
16
 
17
  do_cpy (s, "1","2","3","4", "5", "6", "7", "");
18
 
19
  if (s[0] != '1' || s[1] !='2' || s[2] != '3' || s[3] != '4'
20
      || s[4] != '5' || s[5] != '6' || s[6] != '7' || s[7] != 0)
21
    abort ();
22
 
23
  return 0;
24
}

powered by: WebSVN 2.1.0

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