Hi, I have noticed that hash_operand computes a hash value that is unused since two is a local variable. This patch fixes it.
Bootstrapped/regtested x86_64-linux, OK? * fold-const.c (operand_compare::hash_operand): Fix hashing of operand 3 of multiply and add. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index c47557daeba..8844069127c 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -3806,7 +3806,7 @@ operand_compare::hash_operand (const_tree t, inchash::hash &hstate, hash_operand (TREE_OPERAND (t, 0), one, flags); hash_operand (TREE_OPERAND (t, 1), two, flags); hstate.add_commutative (one, two); - hash_operand (TREE_OPERAND (t, 2), two, flags); + hash_operand (TREE_OPERAND (t, 2), hstate, flags); return; }