OSDN Git Service

2002-05-23 Vladimir Makarov <vmakarov@redhat.com>
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 23 May 2002 21:58:17 +0000 (21:58 +0000)
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 23 May 2002 21:58:17 +0000 (21:58 +0000)
* genautomata.c (reserv_sets_hash_value): Use shift equal to 3/4
of size of unsigned.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53813 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/genautomata.c

index 6209ff6..d372273 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-23  Vladimir Makarov  <vmakarov@redhat.com>
+
+       * genautomata.c (reserv_sets_hash_value): Use shift equal to 3/4
+       of size of unsigned.
+
 2002-05-23  Richard Henderson  <rth@redhat.com>
 
        * configure.in (HAVE_AS_TLS): New test.
index ae69c52..900cfb6 100644 (file)
@@ -3413,10 +3413,10 @@ reserv_sets_hash_value (reservs)
   if (sizeof (set_el_t) <= sizeof (unsigned))
     return hash_value;
   result = 0;
-  for (i = sizeof (set_el_t); i > 0; i -= sizeof (unsigned))
+  for (i = sizeof (set_el_t); i > 0; i -= sizeof (unsigned) - 1)
     {
       result += (unsigned) hash_value;
-      hash_value >>= sizeof (unsigned) * CHAR_BIT;
+      hash_value >>= (sizeof (unsigned) - 1) * CHAR_BIT;
     }
   return result;
 }