https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81758
--- Comment #15 from Paul Thomas <pault at gcc dot gnu.org> --- Hi DIL, On reflection, this is OK and agrees with your diagnosis: > val_p._vptr = (struct __vtype__STAR * {ref-all}) &__vtab__STAR; > val_p._len = 0; > val_p._data = 0B; > cep._vptr = (struct __vtype_gfc_base_Gfc_cont_elem_t * {ref-all}) > &__vtab_gfc_base_Gfc_cont_elem_t; > cep._data = 0B; > { > struct __class_gfc_base_Gfc_cont_elem_t_p rhs.69; > > rhs.69 = this->_vptr->element ((struct > __class_gfc_vector_Vector_iter_t_t *) this, (integer(kind=8) *) offset, > &errc); > cep._vptr = rhs.69._vptr; > cep._data = rhs.69._data; > } > if ((logical(kind=4)) (errc == 0 && cep._data != 0B)) > { > { > struct __class_gfc_base_Gfc_cont_elem_t_t this.70; > struct __class__STAR_p rhs.71; > > this.70 = VIEW_CONVERT_EXPR<struct > __class_gfc_base_Gfc_cont_elem_t_t>(cep); > rhs.71 = cep._vptr->get_value (&this.70, &errc); > val_p._vptr = rhs.71._vptr; > val_p._len = 0; > val_p._data = rhs.71._data; > } > } The vtable pointed to by rhs.69._vptr and so cep._vptr is clearly not the right one. I am on a business trip right now and so cannot work on this bug (back on Thursday). However, it would help me get back up to speed if you could give me a few pointers, if you will excuse the pun. It should be possible to tell from your debug session which type's vtable is being pointed to and MAYBE where the wrong assignment to the vpointer is being made. BTW is this the first visit to this bit of code? I didn't run a debug session yet because the crash is so spectacular that I had to restart the terminal each time! After three or four such, the system falls over :-) I'll get back to this problem later on this week. I regard it as being a serious bug and want to get on top of it asap. Paul