summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/387-5.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/387-5.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/387-5.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/387-5.c b/gcc/testsuite/gcc.target/i386/387-5.c
new file mode 100644
index 00000000000..fd3106e0270
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/387-5.c
@@ -0,0 +1,11 @@
+/* Verify that -mno-fancy-math-387 works. */
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-O -ffast-math -mfpmath=387 -mno-fancy-math-387 -march=i386" } */
+/* { dg-final { scan-assembler "call\t_?atan" } } */
+/* { dg-final { scan-assembler "call\t_?log1p" } } */
+/* { dg-final { scan-assembler "call\t_?drem" } } */
+
+double f1(double x) { return __builtin_atan(x); }
+double f2(double x) { return __builtin_log1p(x); }
+double f3(double x, double y) { return __builtin_drem(x,y); }