diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/387-7.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/387-7.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/387-7.c b/gcc/testsuite/gcc.target/i386/387-7.c new file mode 100644 index 00000000000..edcdac1ae3f --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/387-7.c @@ -0,0 +1,14 @@ +/* Verify that 387 fsincos instruction is generated. */ +/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ +/* { dg-require-effective-target ilp32 } */ +/* { dg-options "-O -ffast-math -march=i686" } */ +/* { dg-final { scan-assembler "fsincos" } } */ + +extern double sin (double); +extern double cos (double); + +double f1(double x) +{ + return sin(x) + cos (x); +} + |