summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/ia64/20040303-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/ia64/20040303-1.c')
-rw-r--r--gcc/testsuite/gcc.target/ia64/20040303-1.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/ia64/20040303-1.c b/gcc/testsuite/gcc.target/ia64/20040303-1.c
new file mode 100644
index 000000000..60b5c528f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/ia64/20040303-1.c
@@ -0,0 +1,20 @@
+/* Test floating point division on ia64. There was a bug in the
+ max-throughput version of the inline division code. Expecting an
+ exact value from a floating point expression is unwise but GCC
+ depends on it in allocno_compare. */
+
+/* { dg-do run } */
+/* { dg-options "-minline-float-divide-max-throughput" } */
+
+extern void abort (void);
+
+volatile int i = 24;
+volatile int j = 30;
+volatile int k = 1;
+
+int main()
+{
+ int pri2 = (((double) i / j) * (10000 / 1000) * k);
+ if (pri2 != 8) abort();
+ return 0;
+}