https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83755
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- We can prevent this by always casting the stored pointer to void* self.pointer = self.pointer.cast(gdb.lookup_type("void").pointer())