This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/46413] [OOP] ICE when printing a polymorphic type


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]