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/43207] [OOP] invalid pointer assignment => type%parent


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

--- Comment #10 from janus at gcc dot gnu.org 2012-11-07 22:26:18 UTC ---
Here is a draft patch which rejects comment #1:

Index: gcc/fortran/primary.c
===================================================================
--- gcc/fortran/primary.c    (revision 193296)
+++ gcc/fortran/primary.c    (working copy)
@@ -2104,6 +2104,13 @@ check_substring:
     }
     }

+  /* F03:C611.  */
+  if (primary->ts.type == BT_DERIVED && primary->ts.u.derived->attr.abstract)
+    {
+      gfc_error ("Nonpolymorphic reference to abstract type at %C");
+      return MATCH_ERROR;
+    }
+
   /* F2008, C727.  */
   if (primary->expr_type == EXPR_PPC && gfc_is_coindexed (primary))
     {


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