aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/991230-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/i386/991230-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/991230-1.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/991230-1.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/991230-1.c
new file mode 100644
index 000000000..2c9f011ce
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/991230-1.c
@@ -0,0 +1,24 @@
+/* { dg-do run } */
+/* { dg-require-effective-target ia32 } */
+/* { dg-options "-O -ffast-math -mtune=i486" } */
+
+/* Test that floating point greater-than tests are compiled correctly with
+ -ffast-math. */
+
+extern void abort (void);
+
+static int gt (double a, double b)
+{
+ if (a > b)
+ return 4;
+ return 0;
+}
+
+static double zero = 0.0;
+
+int main ()
+{
+ if (gt (zero, zero))
+ abort ();
+ return 0;
+}