http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43366
--- Comment #4 from janus at gcc dot gnu.org 2011-02-03 20:56:10 UTC --- Here is a simple patch for getting rid of the error message: Index: gcc/fortran/resolve.c =================================================================== --- gcc/fortran/resolve.c (revision 169520) +++ gcc/fortran/resolve.c (working copy) @@ -8879,15 +8879,13 @@ resolve_ordinary_assign (gfc_code *code, gfc_names gfc_current_ns->proc_name->attr.implicit_pure = 0; } - /* F03:7.4.1.2. */ - /* FIXME: Valid in Fortran 2008, unless the LHS is both polymorphic - and coindexed; cf. F2008, 7.2.1.2 and PR 43366. */ - if (lhs->ts.type == BT_CLASS) - { - gfc_error ("Variable must not be polymorphic in assignment at %L", - &lhs->where); - return false; - } + /* F03:7.4.1.2, F08:7.2.1.2. */ + /* Valid in Fortran 2008, unless the LHS is both polymorphic and coindexed. */ + if (lhs->ts.type == BT_CLASS + && gfc_notify_std (GFC_STD_F2008, + "Fortran 2008: Variable must not be polymorphic in " + "assignment at %L", &lhs->where) == FAILURE) + return false; /* F2008, Section 7.2.1.2. */ if (gfc_is_coindexed (lhs) && gfc_has_ultimate_allocatable (lhs))