Hi all, here is the fix for an OOP-regression reported today by Andrew Benson (http://gcc.gnu.org/ml/fortran/2011-06/msg00119.html). It is fixed by checking the 'class_ok' attribute, which determines whether the CLASS declaration was ok. We also need to set this attribute for components read from module files, since the attribute itself is not written to the file. The patch was regtested on x86_64-unknown-linux-gnu. Ok for trunk? Cheers, Janus 2011-06-15 Janus Weil PR fortran/49417 * module.c (mio_component): Make sure the 'class_ok' attribute is set for use-associated CLASS components. * parse.c (parse_derived): Check for 'class_ok' attribute. * resolve.c (resolve_fl_derived): Ditto. 2011-06-15 Janus Weil PR fortran/49417 * gfortran.dg/class_43.f03: New.