aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/builtins.c2
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20030624-1.c6
4 files changed, 18 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9163bb2..e0bfc15 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
2003-06-24 Roger Sayle <roger@eyesopen.com>
+ PR optimization/11311
+ * builtins.c (powi_cost): Fix typo. The number of multiplications
+ required is the number to reduce the argument, result, plus the
+ cost of calculating the residual, val [not n, the original value].
+
+2003-06-24 Roger Sayle <roger@eyesopen.com>
+
* config/alpha/osf5.h (TARGET_C99_FUNCTIONS): Define.
2003-06-24 Richard Henderson <rth@redhat.com>
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 372c0c2..3c4268f 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -2068,7 +2068,7 @@ powi_cost (HOST_WIDE_INT n)
}
}
- return result + powi_lookup_cost (n, cache);
+ return result + powi_lookup_cost (val, cache);
}
/* Recursive subroutine of expand_powi. This function takes the array,
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 2b8cff0..b2497a3 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2003-06-24 Roger Sayle <roger@eyesopen.com>
+
+ * gcc.c-torture/compile/20030624-1.c: New test case.
+
2003-06-24 Jakub Jelinek <jakub@redhat.com>
* gcc.c-torture/execute/string-opt-17.c: New test.
diff --git a/gcc/testsuite/gcc.c-torture/compile/20030624-1.c b/gcc/testsuite/gcc.c-torture/compile/20030624-1.c
new file mode 100644
index 0000000..9c293fc
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/20030624-1.c
@@ -0,0 +1,6 @@
+/* Derived from PR optimization/11311 */
+
+double pow(double, double);
+
+double foo(double x) { return pow(x,261); }
+