This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/52968] Call to type-bound procedure produces wrongly rejected
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 13 Apr 2012 07:14:46 +0000
- Subject: [Bug fortran/52968] Call to type-bound procedure produces wrongly rejected
- Auto-submitted: auto-generated
- References: <bug-52968-4@http.gcc.gnu.org/bugzilla/>
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.