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/50625] [4.6/4.7 Regression][OOP] ALLOCATABLE attribute lost for module CLASS variables


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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |janus at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #4 from janus at gcc dot gnu.org 2011-10-06 22:19:43 UTC ---
(In reply to comment #2)
> However, with this patch, the test case gives me a different error:
> 
> internal compiler error: in gfc_conv_component_ref, at fortran/trans-expr.c:529

This can be fixed with an additional patchlet:


Index: gcc/fortran/trans-decl.c
===================================================================
--- gcc/fortran/trans-decl.c    (revision 179592)
+++ gcc/fortran/trans-decl.c    (working copy)
@@ -1179,7 +1179,10 @@ gfc_get_symbol_decl (gfc_symbol * sym)
     {
       gfc_component *c = CLASS_DATA (sym);
       if (!c->ts.u.derived->backend_decl)
-    gfc_find_derived_vtab (c->ts.u.derived);
+    {
+      gfc_find_derived_vtab (c->ts.u.derived);
+      gfc_get_derived_type (sym->ts.u.derived);
+    }
     }

   /* All deferred character length procedures need to retain the backend


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