After
r15-4050-g5dad738c1dd164 register_specialization needs to set
elt.hash to the (maybe) precomputed hash so that the lookup uses it
rather than redundantly computing it from scratch.
gcc/cp/ChangeLog:
* pt.cc (register_specialization): Set elt.hash.
Reviewed-by: Jason Merrill <jason@redhat.com>
elt.tmpl = tmpl;
elt.args = args;
elt.spec = spec;
-
- if (hash == 0)
- hash = spec_hasher::hash (&elt);
+ elt.hash = hash;
spec_entry **slot = decl_specializations->find_slot (&elt, INSERT);
if (*slot)