diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2016-12-09 22:25:26 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2016-12-09 22:25:26 +0000 |
commit | c064374dc436b7e7150be2a01c81f4b71072ef1a (patch) | |
tree | 9a6e983fb6c75fc6a70618631ea1221773a5aab7 /gcc/fortran/parse.c | |
parent | 36823125e4aee32d457568a0666e9306f5cf7fae (diff) | |
download | gcc-c064374dc436b7e7150be2a01c81f4b71072ef1a.zip gcc-c064374dc436b7e7150be2a01c81f4b71072ef1a.tar.gz gcc-c064374dc436b7e7150be2a01c81f4b71072ef1a.tar.bz2 |
re PR fortran/77903 ([F08] gfortran 6.1.0/7.0.0 accept invalid code with conflicting module/submodule interfaces)
2016-12-09 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-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/77903
* gfortran.dg/submodule_20.f08: New test.
From-SVN: r243507
Diffstat (limited to 'gcc/fortran/parse.c')
-rw-r--r-- | gcc/fortran/parse.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index b72863a..6addae3 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -5556,11 +5556,11 @@ get_modproc_result (void) proc = gfc_current_ns->proc_name ? gfc_current_ns->proc_name : NULL; if (proc != NULL && proc->attr.function - && proc->ts.interface - && proc->ts.interface->result - && proc->ts.interface->result != proc->ts.interface) + && proc->tlink + && proc->tlink->result + && proc->tlink->result != proc->tlink) { - gfc_copy_dummy_sym (&proc->result, proc->ts.interface->result, 1); + gfc_copy_dummy_sym (&proc->result, proc->tlink->result, 1); gfc_set_sym_referenced (proc->result); proc->result->attr.if_source = IFSRC_DECL; gfc_commit_symbol (proc->result); |