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



--- Comment #3 from janus at gcc dot gnu.org 2012-12-28 19:23:38 UTC ---

The second error is fixed by the following:



Index: gcc/fortran/intrinsic.c

===================================================================

--- gcc/fortran/intrinsic.c    (revision 194743)

+++ gcc/fortran/intrinsic.c    (working copy)

@@ -4287,8 +4287,9 @@ gfc_convert_type_warn (gfc_expr *expr, gfc_typespe

   if (expr->ts.type == BT_UNKNOWN)

     goto bad;



-  if (expr->ts.type == BT_DERIVED && ts->type == BT_DERIVED

-      && gfc_compare_types (&expr->ts, ts))

+  if (expr->ts.type == BT_DERIVED

+      && (ts->type == BT_DERIVED || ts->type == BT_CLASS) 

+      && gfc_compare_types (ts, &expr->ts))

     return SUCCESS;



   sym = find_conv (&expr->ts, ts);

Reply via email to