This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/50625] [4.6/4.7 Regression][OOP] ALLOCATABLE attribute lost for module CLASS variables
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 06 Oct 2011 22:19:43 +0000
- Subject: [Bug fortran/50625] [4.6/4.7 Regression][OOP] ALLOCATABLE attribute lost for module CLASS variables
- Auto-submitted: auto-generated
- References: <bug-50625-4@http.gcc.gnu.org/bugzilla/>
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