------- Comment #4 from janus at gcc dot gnu dot org 2010-06-28 20:02 ------- The fix for this bug turns out to be totally trivial:
Index: gcc/fortran/trans-intrinsic.c =================================================================== --- gcc/fortran/trans-intrinsic.c (revision 161504) +++ gcc/fortran/trans-intrinsic.c (working copy) @@ -4416,6 +4416,8 @@ gfc_conv_associated (gfc_se *se, gfc_expr *expr) else { /* An optional target. */ + if (arg2->expr->ts.type == BT_CLASS) + gfc_add_component_ref (arg2->expr, "$data"); ss2 = gfc_walk_expr (arg2->expr); nonzero_charlen = NULL_TREE; The first argument of ASSOCIATED being polymorphic was already handled correctly, but not so for the second one. -- janus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |janus at gcc dot gnu dot org |dot org | Status|NEW |ASSIGNED Last reconfirmed|2010-06-28 14:42:05 |2010-06-28 20:02:43 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44696