This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/58043] [OOP] Incorrect behaviour of polymorphic array


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58043

--- Comment #3 from janus at gcc dot gnu.org ---
The WRITE of the second element in main is translated into: 

_gfortran_transfer_real_write (&dt_parm.7, (real(kind=4) *) &((struct adof_t *)
dofs._data.data + (sizetype) ((dofs._data.offset + 1) * (integer(kind=8))
dofs._vptr->_size))->grd + (sizetype) dofs._vptr->_size, 4);


The problem is apparently that "grd" does not receive the correct indexing
here, but instead "dofs._vptr->_size" is added to the address, which however is
the element size of the "dofs" array and not of "grd"!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]