aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/interface.c
diff options
context:
space:
mode:
authorMark Eggleston <markeggleston@gcc.gnu.org>2020-06-25 05:16:50 +0100
committerMark Eggleston <markeggleston@gcc.gnu.org>2020-07-02 07:48:04 +0100
commit8f8ea4a47f3ab0b44b2bbf1c77db6111325d4841 (patch)
treeab0e7dfc58fb1fe7cb84b05bc8ed4c3dc75e979e /gcc/fortran/interface.c
parent224682ffa19a6817e4d0bde59200169c3413b532 (diff)
downloadgcc-8f8ea4a47f3ab0b44b2bbf1c77db6111325d4841.zip
gcc-8f8ea4a47f3ab0b44b2bbf1c77db6111325d4841.tar.gz
gcc-8f8ea4a47f3ab0b44b2bbf1c77db6111325d4841.tar.bz2
Fortran : ICE in generic_correspondence PR95584
Output an error for ambiguous interfaces in generic interface instead of ICE. 2020-07-02 Steven G. Kargl <kargl@gcc.gnu.org> gcc/fortran/ PR fortran/95584 * interface.c (generic_correspondence): Only use the pointer to a symbol if exists. 2020-07-02 Mark Eggleston <markeggleston@gcc.gnu.org> gcc/testsuite/ PR fortran/95584 * gfortran.dg/pr95584.f90: New test.
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r--gcc/fortran/interface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c
index b1a75a3..0cc504f 100644
--- a/gcc/fortran/interface.c
+++ b/gcc/fortran/interface.c
@@ -1257,7 +1257,7 @@ generic_correspondence (gfc_formal_arglist *f1, gfc_formal_arglist *f2,
while (f1)
{
- if (f1->sym->attr.optional)
+ if (!f1->sym || f1->sym->attr.optional)
goto next;
if (p1 && strcmp (f1->sym->name, p1) == 0)