From dcc53f137c4136424445416601f9889d18b3344c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 11 Nov 2010 09:09:46 +0100 Subject: [PATCH] re PR debug/46150 (-fcompare-debug failure (length) with -fPIC -O2) PR debug/46150 * tree-ssa-loop-ivopts.c (htab_inv_expr_eq): Don't return true if expr1->hash != expr2->hash. From-SVN: r166595 --- gcc/ChangeLog | 6 ++++++ gcc/tree-ssa-loop-ivopts.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 03fae9f5e87..850802ebb8c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-11-11 Jakub Jelinek + + PR debug/46150 + * tree-ssa-loop-ivopts.c (htab_inv_expr_eq): Don't return + true if expr1->hash != expr2->hash. + 2010-11-10 Joseph Myers * cfgloop.c (verify_loop_structure): Use %' in diagnostics. Start diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index ab2e67af2ae..59e2fef5976 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -834,7 +834,8 @@ htab_inv_expr_eq (const void *ent1, const void *ent2) const struct iv_inv_expr_ent *expr2 = (const struct iv_inv_expr_ent *)ent2; - return operand_equal_p (expr1->expr, expr2->expr, 0); + return expr1->hash == expr2->hash + && operand_equal_p (expr1->expr, expr2->expr, 0); } /* Hash function for loop invariant expressions. */