aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2024-07-22 11:07:28 +0200
committerRichard Biener <rguenth@gcc.gnu.org>2024-07-22 13:53:26 +0200
commita8e61cd71f0cda04d583722ca4c66301358b01e1 (patch)
tree163d280825e54d3ba4e322a1244799bf6cad3392 /gcc/fold-const.cc
parent1e32a8be69d3f91e45193a0a1aa0dcae7ebe0acb (diff)
downloadgcc-a8e61cd71f0cda04d583722ca4c66301358b01e1.zip
gcc-a8e61cd71f0cda04d583722ca4c66301358b01e1.tar.gz
gcc-a8e61cd71f0cda04d583722ca4c66301358b01e1.tar.bz2
Fix hash of WIDEN_*_EXPR
We're hashing operand 2 to the temporary hash. * fold-const.cc (operand_compare::hash_operand): Fix hash of WIDEN_*_EXPR.
Diffstat (limited to 'gcc/fold-const.cc')
-rw-r--r--gcc/fold-const.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fold-const.cc b/gcc/fold-const.cc
index 83c32dd..8908e73 100644
--- a/gcc/fold-const.cc
+++ b/gcc/fold-const.cc
@@ -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;
}