aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2016-12-09 22:25:26 +0000
committerPaul Thomas <pault@gcc.gnu.org>2016-12-09 22:25:26 +0000
commitc064374dc436b7e7150be2a01c81f4b71072ef1a (patch)
tree9a6e983fb6c75fc6a70618631ea1221773a5aab7 /gcc/fortran/resolve.c
parent36823125e4aee32d457568a0666e9306f5cf7fae (diff)
downloadgcc-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/resolve.c')
-rw-r--r--gcc/fortran/resolve.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 2093de91..d04b431 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -12282,10 +12282,8 @@ resolve_fl_procedure (gfc_symbol *sym, int mp_flag)
module_name = strtok (name, ".");
submodule_name = strtok (NULL, ".");
- /* Stop the dummy characteristics test from using the interface
- symbol instead of 'sym'. */
- iface = sym->ts.interface;
- sym->ts.interface = NULL;
+ iface = sym->tlink;
+ sym->tlink = NULL;
/* Make sure that the result uses the correct charlen for deferred
length results. */
@@ -12333,7 +12331,7 @@ resolve_fl_procedure (gfc_symbol *sym, int mp_flag)
}
check_formal:
- /* Check the charcateristics of the formal arguments. */
+ /* Check the characteristics of the formal arguments. */
if (sym->formal && sym->formal_ns)
{
for (arg = sym->formal; arg && arg->sym; arg = arg->next)
@@ -12342,8 +12340,6 @@ check_formal:
gfc_traverse_ns (sym->formal_ns, compare_fsyms);
}
}
-
- sym->ts.interface = iface;
}
return true;
}