From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- .../gcc.target/x86_64/abi/callabi/func-2a.c | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2a.c (limited to 'gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2a.c') diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2a.c b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2a.c new file mode 100644 index 000000000..048da6e56 --- /dev/null +++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2a.c @@ -0,0 +1,27 @@ +/* Test for cross x86_64<->w64 abi standard calls. */ +/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */ +/* { dg-options "-O2 -mabi=ms -std=gnu99 -ffast-math -fno-builtin" } */ +/* { dg-additional-sources "func-2b.c" } */ + +extern void __attribute__ ((sysv_abi)) abort (void); +long double func_cross (long double, double, float, long, int, char); + +long double __attribute__ ((sysv_abi)) +func_native (long double a, double b, float c, long d, int e, char f) +{ + long double ret; + ret = a + (long double) b + (long double) c; + ret *= (long double) (d + (long) e); + if (f>0) + ret += func_native (a,b,c,d,e,-f); + return ret; +} + +int __attribute__ ((sysv_abi)) +main () +{ + if (func_cross (1.0,2.0,3.0,1,2,3) + != func_native (1.0,2.0,3.0,1,2,3)) + abort (); + return 0; +} -- cgit v1.2.3