Index: gcc/tree.c
===================================================================
--- gcc/tree.c	(revision 229383)
+++ gcc/tree.c	(working copy)
@@ -1119,8 +1119,10 @@
 {
   const_tree const t = (const_tree) x;
 
-  return (TREE_INT_CST_HIGH (t) ^ TREE_INT_CST_LOW (t)
-	  ^ TYPE_UID (TREE_TYPE (t)));
+  hashval_t hash = TYPE_UID (TREE_TYPE (t));
+  hash = iterative_hash_host_wide_int (TREE_INT_CST_HIGH (t), hash);
+  hash = iterative_hash_host_wide_int (TREE_INT_CST_LOW (t), hash);
+  return hash;
 }
 
 /* Return nonzero if the value represented by *X (an INTEGER_CST tree node)
