This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/46413] [OOP] ICE when printing a polymorphic type
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 11 Nov 2010 09:16:12 +0000
- Subject: [Bug fortran/46413] [OOP] ICE when printing a polymorphic type
- Auto-submitted: auto-generated
- References: <bug-46413-4@http.gcc.gnu.org/bugzilla/>
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