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/47455] [4.6 Regression][OOP] internal compiler error: in fold_convert_loc, at fold-const.c:2028


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

--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-26 18:47:00 UTC ---
Created attachment 23136
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23136
Test case (hopefully correct)

Updated test case, hopefully correct. Fails with gfortran due to this PR - and
with ifort 11.1 and crayftn due to other compiler bugs; thus, I could not
properly test it.

The result with the patch is kind of OK for the pointer version (find_x):
  this%x = this%find_x(that, .false.)
is translated into:
  *this->_data->x = *this->_vptr->find_x ((struct __class_class_t_T *) this,
                                          &that, &C.1605);

so far so good. But for a normal assignment, allocatable components require an
allocate + deep copy with memcpy.


For the allocatable, there is an additional issue:
  this%y = this%find_y()
is translated into
  this->_data->y = *this->_vptr->find_y ((struct __class_class_t_T *) this);

At a glance that looks OK. However, it immediately segfaults. One thing which 
and fails immediately (segfault) - though, I do not see why it segfaults.


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