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)
     {

Reply via email to