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
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-17 13:15:51 -0300
commitfb4a20d95983d4c6548cf559ab3021f67671b5e4 (patch)
tree3c3a6bfcd577fd12f797e7de5e16e74ae99d1e80 /gcc/fortran/interface.c
parent5407b04786ebcaeb8ffa10cc2445c5b18d7a1e72 (diff)
downloadgcc-fb4a20d95983d4c6548cf559ab3021f67671b5e4.zip
gcc-fb4a20d95983d4c6548cf559ab3021f67671b5e4.tar.gz
gcc-fb4a20d95983d4c6548cf559ab3021f67671b5e4.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)