Commit 06e6dc29 by Tom de Vries Committed by Tom de Vries

Add gcc.target/x86_64/abi/callabi/vaarg-6.c

2015-02-17  Tom de Vries  <tom@codesourcery.com>

	* gcc.target/x86_64/abi/callabi/vaarg-6.c: New test.

From-SVN: r220757
parent 61a17dca
2015-02-17 Tom de Vries <tom@codesourcery.com>
* gcc.target/x86_64/abi/callabi/vaarg-6.c: New test.
2015-02-17 Paolo Carlini <paolo.carlini@oracle.com> 2015-02-17 Paolo Carlini <paolo.carlini@oracle.com>
Jakub Jelinek <jakub@redhat.com> Jakub Jelinek <jakub@redhat.com>
......
/* { dg-do run } */
/* { dg-options "-O2 -mabi=ms -std=gnu99 -fno-builtin" } */
#include <stdarg.h>
extern void __attribute__ ((sysv_abi)) abort (void);
char *a = "1";
char *b = "2";
static void __attribute__((noinline,noclone))
do_cpy2 (va_list argp)
{
char *e;
e = va_arg (argp, char *);
e = va_arg (argp, char *);
if (e != b)
abort ();
}
void __attribute__((noinline,noclone))
do_cpy (int dummy, ...)
{
va_list argp;
va_start (argp, dummy);
do_cpy2 (argp);
va_end (argp);
}
int __attribute__ ((sysv_abi))
main ()
{
do_cpy (0, a, b);
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment