This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[GOOGLE] bug in discriminator assignment


This patch fixes a bug in assigning discrminator. We should explicitly
call the hash function when finding the next discriminator.

Bootstrapped and passed regression tests.

OK for google branches?

Thanks,
Dehao

Index: gcc/tree-cfg.c
===================================================================
--- gcc/tree-cfg.c (revision 201632)
+++ gcc/tree-cfg.c (working copy)
@@ -709,7 +709,7 @@ next_discriminator_for_locus (location_t locus)
   item.discriminator = 0;
   slot = (struct locus_discrim_map **)
       htab_find_slot_with_hash (discriminator_per_locus, (void *) &item,
-                                (hashval_t) locus, INSERT);
+                                locus_map_hash (&item), INSERT);
   gcc_assert (slot);
   if (*slot == HTAB_EMPTY_ENTRY)
     {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]