[Bug fortran/41719] [OOP] invalid: Intrinsic assignment involving polymorphic variables

janus at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Oct 16 18:44:00 GMT 2009



------- Comment #2 from janus at gcc dot gnu dot org  2009-10-16 18:44 -------
Preliminary patch:

Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c       (Revision 152915)
+++ gcc/fortran/resolve.c       (Arbeitskopie)
@@ -7629,6 +7629,14 @@ resolve_ordinary_assign (gfc_code *code, gfc_names
        }
     }

+  /* F03:7.4.1.2.  */
+  if (lhs->ts.type == BT_CLASS)
+    {
+      gfc_error ("Variable must not be polymorphic in assignment at %L",
+                &lhs->where);
+      return false;
+    }
+
   gfc_check_assign (lhs, rhs, 1);
   return false;
 }


-- 

janus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|invalid: Intrinsic          |[OOP] invalid: Intrinsic
                   |assignment involving        |assignment involving
                   |polymorphic variables       |polymorphic variables


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



More information about the Gcc-bugs mailing list