aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.apple/darwin-fsel-3.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.apple/darwin-fsel-3.c')
-rw-r--r--gcc/testsuite/gcc.apple/darwin-fsel-3.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.apple/darwin-fsel-3.c b/gcc/testsuite/gcc.apple/darwin-fsel-3.c
new file mode 100644
index 00000000000..3c7b19e0453
--- /dev/null
+++ b/gcc/testsuite/gcc.apple/darwin-fsel-3.c
@@ -0,0 +1,12 @@
+/* { dg-do compile { target powerpc*-*-darwin* } } */
+/* { dg-options "-O -mpowerpc-gfxopt" } */
+/* { dg-final { scan-assembler "fsub" } } */
+
+/* This is the same as gcc.dg/ppc-fsel-3.c, which is checking to see
+ that this optimization is *not* done, that is, that
+ -fno-trapping-math is the default. They can't both pass. */
+
+double foo(double a, double b, double c, double d)
+{
+ return a < b ? c : d;
+}