summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index cbc5bc6f5c2..0b239121a06 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-11-03 Sebastian Pop <pop@cri.ensmp.fr>
+
+ * tree.c (tree_fold_gcd): Use FLOOR_MOD_EXPR instead of
+ CEIL_MOD_EXPR.
+
2004-11-03 Jeff Law <law@redhat.com>
* stmt.c (expand_case): Speed up code to detect duplicate case
diff --git a/gcc/tree.c b/gcc/tree.c
index 2cfcde2ff4d..1af25cbf1a2 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -6029,7 +6029,7 @@ tree_fold_gcd (tree a, tree b)
while (1)
{
- a_mod_b = fold (build2 (CEIL_MOD_EXPR, type, a, b));
+ a_mod_b = fold (build2 (FLOOR_MOD_EXPR, type, a, b));
if (!TREE_INT_CST_LOW (a_mod_b)
&& !TREE_INT_CST_HIGH (a_mod_b))