diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/arm/vfp-longcall-apcs.c')
-rw-r--r-- | gcc/testsuite/gcc.target/arm/vfp-longcall-apcs.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/arm/vfp-longcall-apcs.c b/gcc/testsuite/gcc.target/arm/vfp-longcall-apcs.c new file mode 100644 index 00000000000..fa22b4da534 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/vfp-longcall-apcs.c @@ -0,0 +1,32 @@ +/* { dg-do run } */ +/* { dg-options "-mapcs-frame -O -foptimize-sibling-calls -ffunction-sections" } */ + +extern void abort (void); + +static __attribute__((noclone, noinline, long_call)) +int foo (int a, int b, int c, int d, double i) +{ + return a; +} + +static __attribute__((noclone, noinline)) +double baz (double i) +{ + return i; +} + +static __attribute__((noclone, noinline)) +int bar (int a, int b, int c, int d, double i, double j) +{ + double l = baz (i) * j; + return foo (a, b, c, d, l); +} + +int +main (void) +{ + if (bar (0, 0, 0, 0, 0.0, 0.0) != 0) + abort (); + + return 0; +} |