This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, fortran] Ping! - PR77903 - [F08] gfortran 6.1.0/7.0.0 accept invalid code with conflicting module/submodule interfaces


On 12/08/2016 09:54 AM, Paul Richard Thomas wrote:
On 5 December 2016 at 21:01, Paul Richard Thomas
<paul.richard.thomas@gmail.com> wrote:
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.




OK, thanks,

Jerry


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]