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

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-11-11 
09:16:08 UTC ---
Untested patch:

Index: resolve.c
===================================================================
--- resolve.c   (Revision 166596)
+++ resolve.c   (Arbeitskopie)
@@ -7948,6 +7948,15 @@ resolve_transfer (gfc_code *code)
     if (ref->type == REF_COMPONENT)
       ts = &ref->u.c.component->ts;

+  if (ts->type == BT_CLASS)
+    {
+      /* FIXME: Test whether there defined input/output is done.  */
+      gfc_error ("Data transfer element at %L cannot be polymorphic unless "
+                "it is processed by a defined input/output procedure",
+                &code->loc);
+      return;
+    }
+
   if (ts->type == BT_DERIVED)
     {
       /* Check that transferred derived type doesn't contain POINTER

Reply via email to