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