http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57297
Mikael Morin <mikael at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mikael at gcc dot gnu.org --- Comment #1 from Mikael Morin <mikael at gcc dot gnu.org> --- Thanks for the detailed bug report. It's very informative (even if I don't understand everything ;-) ). Here is a "shot in the dark" patch (on the fortran side); does it work for you? Index: class.c =================================================================== --- class.c (révision 198085) +++ class.c (copie de travail) @@ -581,10 +581,14 @@ gfc_build_class_symbol (gfc_typespec *ts, symbol_a sprintf (name, "__class_%s_%d_%da", tname, rank, (*as)->corank); else if ((*as) && attr->pointer) sprintf (name, "__class_%s_%d_%dp", tname, rank, (*as)->corank); + else if ((*as) && attr->target) + sprintf (name, "__class_%s_%d_%dt", tname, rank, (*as)->corank); else if ((*as)) sprintf (name, "__class_%s_%d_%d", tname, rank, (*as)->corank); else if (attr->pointer) sprintf (name, "__class_%s_p", tname); + else if (attr->target) + sprintf (name, "__class_%s_t", tname); else if (attr->allocatable) sprintf (name, "__class_%s_a", tname); else @@ -628,6 +632,7 @@ gfc_build_class_symbol (gfc_typespec *ts, symbol_a c->attr.class_pointer = attr->pointer; c->attr.pointer = attr->pointer || (attr->dummy && !attr->allocatable) || attr->select_type_temporary; + c->attr.target = attr->target; c->attr.allocatable = attr->allocatable; c->attr.dimension = attr->dimension; c->attr.codimension = attr->codimension;