Check, after inserting entries, that they don't look empty.
for gcc/ChangeLog
* hash-map.h (put, get_or_insert): Check that entry does not
look empty after insertion.
{
hash_entry *e = m_table.find_slot_with_hash (k, Traits::hash (k),
INSERT);
- bool ins = hash_entry::is_empty (*e);
+ bool ins = Traits::is_empty (*e);
if (ins)
{
e->m_key = k;
new ((void *) &e->m_value) Value (v);
+ gcc_checking_assert (!Traits::is_empty (*e));
}
else
e->m_value = v;
{
e->m_key = k;
new ((void *)&e->m_value) Value ();
+ gcc_checking_assert (!Traits::is_empty (*e));
}
if (existed != NULL)