Dear All,
It took me an excessively long time to realise that processing the
typespec for an explicitly typed module procedure was wiping out the
interface symbol and so preventing the comparison of characteristics
between the interface and the separate module procedure. Transferring
the module interface symbol to the tlink field, rather than the
interface, fixed the problem without doing anything else.
Note the comment in the gfortran.h about the use of the tlink field.
It has been a while since this was used for change management. If it
is preferred, I could introduce a union between tlink and some other
suitable name; eg mod_proc_interface.
Bootstraps and regtests on FC21/x86_64.
OK for trunk and, after a decent interval, 6-branch?
Paul
2016-12-06 Paul Thomas <pault@gcc.gnu.org>
PR fortran/77903
* decl.c (get_proc_name): Use the symbol tlink field instead of
the typespec interface field.
(gfc_match_function_decl, gfc_match_submod_proc): Ditto.
* gfortran.h : Since the symbol tlink field is no longer used
by the frontend for change management, change the comment to
reflect its current uses.
* parse.c (get_modproc_result): Same as decl.c changes.
* resolve.c (resolve_fl_procedure): Ditto.
2016-12-06 Paul Thomas <pault@gcc.gnu.org>
PR fortran/77903
* gfortran.dg/submodule_20.f08: New test.