PR9631 shows a case where vbasetype can be a TYPE_STUB, and since we were not accounting for it, we crashed in TYPE_FIELD_BITPOS: static int gnuv3_baseclass_offset (struct type *type, int index, const bfd_byte *valaddr, CORE_ADDR address) { ... vbasetype = TYPE_VPTR_BASETYPE (type); vbasetype_vptr_fieldno = get_vptr_fieldno (vbasetype, NULL); if (vbasetype_vptr_fieldno >= 0 && TYPE_FIELD_BITPOS (vbasetype, vbasetype_vptr_fieldno) != 0) <<< here error (_("Illegal vptr offset in class %s"), TYPE_NAME (vbasetype) ? TYPE_NAME (vbasetype) : ""); This patch handles it, and adds new testcase. Does it look like the right thing to do here? get_vptr_fieldno also always goes through check_typedef right at the top. OK? -- Pedro Alves