Debian Codegraph @

gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2a.c

raw
1 /* Test for cross x86_64<->w64 abi standard calls. */
2 /* { dg-do run } */
3 /* { dg-options "-O2 -mabi=ms -std=gnu99 -ffast-math -fno-builtin" } */
4 /* { dg-additional-sources "func-2b.c" } */
5
6 extern void __attribute__ ((sysv_abi)) abort (void);
7 long double func_cross (long double, double, float, long, int, char);
8
9 long double __attribute__ ((sysv_abi))
10 func_native (long double a, double b, float c, long d, int e, char f)
11 {
12 long double ret;
13 ret = a + (long double) b + (long double) c;
14 ret *= (long double) (d + (long) e);
15 if (f>0)
16 ret += func_native (a,b,c,d,e,-f);
17 return ret;
18 }
19
20 int __attribute__ ((sysv_abi))
21 main ()
22 {
23 if (func_cross (1.0,2.0,3.0,1,2,3)
24 != func_native (1.0,2.0,3.0,1,2,3))
25 abort ();
26 return 0;
27 }