diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2010-01-15 01:47:43 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2010-01-15 01:47:43 +0000 |
commit | 0175478decf822d4b10d8ff850e55751a50bf70a (patch) | |
tree | 46bace48ee8dd222b909c1c263606a7425cece35 /gcc/fortran/interface.c | |
parent | ab69346017b152c6ae4c1bcffe87cbf5e33ee263 (diff) | |
download | gcc-0175478decf822d4b10d8ff850e55751a50bf70a.zip gcc-0175478decf822d4b10d8ff850e55751a50bf70a.tar.gz gcc-0175478decf822d4b10d8ff850e55751a50bf70a.tar.bz2 |
re PR fortran/42684 (ICE when interface operator(xx) available through host and use assoc in module procedure)
2010-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/42684
* interface.c (check_interface1): Pass symbol name rather than NULL to
gfc_compare_interfaces. (gfc_compare_interfaces): Add assert to
trap MULL.
* resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
than NULL to gfc_compare_interfaces.
From-SVN: r155930
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r-- | gcc/fortran/interface.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index 0034f75..2a5ece1 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -955,6 +955,8 @@ gfc_compare_interfaces (gfc_symbol *s1, gfc_symbol *s2, const char *name2, { gfc_formal_arglist *f1, *f2; + gcc_assert (name2 != NULL); + if (s1->attr.function && (s2->attr.subroutine || (!s2->attr.function && s2->ts.type == BT_UNKNOWN && gfc_get_default_type (name2, s2->ns)->type == BT_UNKNOWN))) @@ -1126,7 +1128,7 @@ check_interface1 (gfc_interface *p, gfc_interface *q0, if (p->sym->name == q->sym->name && p->sym->module == q->sym->module) continue; - if (gfc_compare_interfaces (p->sym, q->sym, NULL, generic_flag, 0, + if (gfc_compare_interfaces (p->sym, q->sym, q->sym->name, generic_flag, 0, NULL, 0)) { if (referenced) |