http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52968
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid Status|UNCONFIRMED |NEW Last reconfirmed| |2012-04-13 CC| |burnus at gcc dot gnu.org, | |janus at gcc dot gnu.org Ever Confirmed|0 |1 --- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-04-13 07:14:46 UTC --- What happens is the following (cf. primary.c's gfc_match_varspec): In the first step, "S % Equation" is matched. One then has: component = gfc_find_component (sym, name, false, false); ... sym = component->ts.u.derived; where sym "__class_solvermodule_Equationtemplate_p". Next, one tries to match "% Evaluate" as type-bound procedure: if (sym->f2k_derived) tbp = gfc_find_typebound_proc (sym, &t, name, false, &gfc_current_locus); However, the class container does not have f2k_derived - only the "_data" component has. Unsurprisingly, it works if one replaces in "type :: SolverType" the CLASS pointer by a TYPE pointer. I have no idea why changing the order of the two type declarations helps - but I didn't try hard.