]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix hash of WIDEN_*_EXPR
authorRichard Biener <rguenther@suse.de>
Mon, 22 Jul 2024 09:07:28 +0000 (11:07 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 22 Jul 2024 11:53:26 +0000 (13:53 +0200)
We're hashing operand 2 to the temporary hash.

* fold-const.cc (operand_compare::hash_operand): Fix hash
of WIDEN_*_EXPR.

gcc/fold-const.cc

index 83c32dd10d4aa7888817beb90825ac1e6a6ae692..8908e7381e72cbbf4a8fd96f18cbf4436aba8441 100644 (file)
@@ -4123,7 +4123,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;
              }