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/53876] [4.8 Regression] [OOP] ICE with class array


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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-08-02 15:39:10 UTC ---
The ICE occurs for:
  CALL display_indv(indv(1))
in gfc_conv_class_to_class, which is called for e == "indiv->_data(1)".

Namely for:

  /* Set the data.  */
  ctree = gfc_class_data_get (var);
   ...
  gfc_add_modify (&parmse->pre, ctree, parmse->expr);


That's the line:
  class.1._data = indv._data.data
                 + (sizetype) ((indv._data.offset + 1)
                  * (integer(kind=8)) indv._vptr->_size);

The problem is that the LHS and the RHS have a different type. Both are
pointers to a record_type, which contains "genes" (type "array1_real(kind=4)")
as component.

However, the decl for both the record type and the "genes" type is different
(only their respective canonical type is the same).

I wonder whether it has something to do with restricted and not. (See also PR
45586). Though, as marking all variables as TARGET doesn't help, I might also
be off track.


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