re PR debug/46150 (-fcompare-debug failure (length) with -fPIC -O2)
authorJakub Jelinek <jakub@redhat.com>
Thu, 11 Nov 2010 08:09:46 +0000 (09:09 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 11 Nov 2010 08:09:46 +0000 (09:09 +0100)
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
gcc/tree-ssa-loop-ivopts.c

index 03fae9f5e87c40e8fb6f32ae3e493bda431f4fad..850802ebb8c268d436145d48ab273db0c8e79a86 100644 (file)
@@ -1,3 +1,9 @@
+2010-11-11  Jakub Jelinek  <jakub@redhat.com>
+
+       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  <joseph@codesourcery.com>
 
        * cfgloop.c (verify_loop_structure): Use %' in diagnostics.  Start
index ab2e67af2aea6af0e9621b06141701b2c09d0cb0..59e2fef5976b4b27c19e846309a4716e237b1836 100644 (file)
@@ -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.  */