This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, fortran] Ping! - PR77903 - [F08] gfortran 6.1.0/7.0.0 accept invalid code with conflicting module/submodule interfaces
- From: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- To: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 8 Dec 2016 18:54:48 +0100
- Subject: Re: [Patch, fortran] Ping! - PR77903 - [F08] gfortran 6.1.0/7.0.0 accept invalid code with conflicting module/submodule interfaces
- Authentication-results: sourceware.org; auth=none
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.
--
If you're walking down the right path and you're willing to keep
walking, eventually you'll make progress.
Barack Obama