diff --git a/gcc/bitmap.cc b/gcc/bitmap.cc
index 6cf326bca5a82dad09ed951b16180782d2ceb55a..459e32c1ad18502e700e789076ba257cd61b1974 100644
--- a/gcc/bitmap.cc
+++ b/gcc/bitmap.cc
@@ -2706,7 +2706,7 @@ bitmap_hash (const_bitmap head)
       for (ix = 0; ix != BITMAP_ELEMENT_WORDS; ix++)
 	hash ^= ptr->bits[ix];
     }
-  return (hashval_t)hash;
+  return iterative_hash (&hash, sizeof (hash), 0);
 }