This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[GOOGLE] bug in discriminator assignment
- From: Dehao Chen <dehao at google dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, Cary Coutant <ccoutant at google dot com>
- Date: Fri, 16 Aug 2013 12:38:55 -0700
- Subject: [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)
{