re PR bootstrap/53912 (bootstrap fails using default c++ mode in stage 2 and 3 for...
authorKai Tietz <ktietz@redhat.com>
Mon, 3 Dec 2012 06:56:16 +0000 (07:56 +0100)
committerKai Tietz <ktietz@gcc.gnu.org>
Mon, 3 Dec 2012 06:56:16 +0000 (07:56 +0100)
PR target/53912
* pointer-set.c (hash1): Cast from pointer via uintptr_t.

From-SVN: r194067

gcc/ChangeLog
gcc/pointer-set.c

index 18c930cc4c4485ef8e902ca5e8d82422adf7687f..bcb7705a66b79acca75ba424b1f7120cd0384383 100644 (file)
@@ -1,3 +1,8 @@
+2012-12-03 Kai Tietz  <ktietz@redhat.com>
+
+       PR target/53912
+       * pointer-set.c (hash1): Cast from pointer via uintptr_t.
+
 2012-12-02  Marek Polacek  <polacek@redhat.com>
 
        PR middle-end/54838
index b57c404f6a1a5ead17e45ba7c2ae1f0d5f054234..ebad5dbf5b35d1ad7954e896dcc0598a3e69ba09 100644 (file)
@@ -64,7 +64,7 @@ hash1 (const void *p, unsigned long max, unsigned long logmax)
 #endif
   const unsigned long shift = HOST_BITS_PER_LONG - logmax;
 
-  return ((A * (unsigned long) p) >> shift) & (max - 1);
+  return ((A * (uintptr_t) p) >> shift) & (max - 1);
 }
 
 /* Allocate an empty pointer set.  */