prevent hash set/map insertion of deleted entries
authorAlexandre Oliva <oliva@adacore.com>
Thu, 29 Dec 2022 17:33:07 +0000 (14:33 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Thu, 29 Dec 2022 17:39:47 +0000 (14:39 -0300)
commit603da201681ad06342055e8c12a656f5289e52a8
tree4312591c8fce568e824ab3875e420cd4b769b8cc
parent512af6c3803c4714cb2a92a8db263fb7f2b4ea10
prevent hash set/map insertion of deleted entries

Just like the recently-added checks for empty entries, add checks for
deleted entries as well.  This didn't catch any problems, but it might
prevent future accidents.  Suggested by David Malcolm.

for  gcc/ChangeLog

* hash-map.h (put, get_or_insert): Check that added entry
doesn't look deleted either.
* hash-set.h (add): Likewise.
gcc/hash-map.h
gcc/hash-set.h