[Bug fortran/81898] [7/8 Regression] [OOP] Issue with polymorphic container class

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Aug 22 02:53:00 GMT 2017


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

--- Comment #2 from janus at gcc dot gnu.org ---
Comparing the dump that is produced by version 6 and 7, I see that the latter
contains an additional line, just before the type-bound call which produces the
segfault:

       (struct __vtype_amodule_Btype *) a._data->obj._vptr =
&__vtab_amodule_Btype;
+      a._vptr = (struct __vtype_amodule_Atype * {ref-all}) a._data->obj._vptr;
       a._data->bobj = a._data->obj._data;

It seems to come from the pointer assignment, but is certainly wrong (it
effectively sets a's vptr to Btype).


More information about the Gcc-bugs mailing list