[Bug fortran/50625] [4.6/4.7 Regression][OOP] ALLOCATABLE attribute lost for module CLASS variables
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Oct 5 21:42:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50625
--- Comment #2 from janus at gcc dot gnu.org 2011-10-05 21:42:33 UTC ---
Here's an attempt to fix it:
Index: module.c
===================================================================
--- module.c (revision 179566)
+++ module.c (working copy)
@@ -3608,6 +3608,8 @@ mio_symbol (gfc_symbol *sym)
mio_symbol_attribute (&sym->attr);
mio_typespec (&sym->ts);
+ if (sym->ts.type == BT_CLASS)
+ sym->attr.class_ok = 1;
if (iomode == IO_OUTPUT)
mio_namespace_ref (&sym->formal_ns);
A similar thing is already being done for components (cf. 'mio_component').
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
More information about the Gcc-bugs
mailing list