aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/387-8.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/i386/387-8.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/387-8.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/387-8.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/387-8.c
new file mode 100644
index 000000000..2dbcd740f
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/387-8.c
@@ -0,0 +1,15 @@
+/* Verify that 387 fptan instruction is generated. Also check that
+ inherent load of 1.0 is used in further calculations. */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -ffast-math -mfpmath=387 -mfancy-math-387" } */
+/* { dg-final { scan-assembler "fptan" } } */
+/* { dg-final { scan-assembler-not "fld1" } } */
+
+extern double tan (double);
+
+double f1(double x)
+{
+ return 1.0 / tan(x);
+}
+