https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90277

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to François Dumont from comment #3)
> As stated in my message this patch can be consider as a fix for this PR as
> it reserve buckets for 11 buckets so iterators are not invalidated during
> execution of the tests. You shouldn't have anymore failures, do you ?
> 
> But maybe you would prefer to make those tests independent of this
> implementation detail. I'll do that too.

I think it's OK to rely on the detail as long as the tests make that explicit.
A comment saying that they assume there's no rehashing would be OK, even better
would be to use VERIFY to assert that the count doesn't change. If we make the
tests actually verify there's no rehashing, then it's OK to assume no hashing
:-)

Currently it's just a silent assumption, which isn't even true any more.

Reply via email to