This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/81898] [7/8 Regression] [OOP] Issue with polymorphic container class
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 21 Aug 2017 18:06:05 +0000
- Subject: [Bug fortran/81898] [7/8 Regression] [OOP] Issue with polymorphic container class
- Auto-submitted: auto-generated
- References: <bug-81898-4@http.gcc.gnu.org/bugzilla/>
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).