diff options
author | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-15 01:47:43 +0000 |
---|---|---|
committer | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-15 01:47:43 +0000 |
commit | ea3155041c21f1a7aad4e61e4a4705e2d53e264e (patch) | |
tree | 46bace48ee8dd222b909c1c263606a7425cece35 /gcc | |
parent | 0243dfa23a31293464b684df081254c189f31059 (diff) | |
download | gcc-ea3155041c21f1a7aad4e61e4a4705e2d53e264e.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155930 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/fortran/interface.c | 4 | ||||
-rw-r--r-- | gcc/fortran/resolve.c | 2 |
3 files changed, 13 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 204d2420221..af85555a2e7 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,12 @@ +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. + 2010-01-14 Paul Thomas <pault@gcc.gnu.org> PR fortran/41478 diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index 0034f75b92e..2a5ece1c465 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) diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 7321c0dd767..9212521b2f3 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -9712,7 +9712,7 @@ check_generic_tbp_ambiguity (gfc_tbp_generic* t1, gfc_tbp_generic* t2, } /* Compare the interfaces. */ - if (gfc_compare_interfaces (sym1, sym2, NULL, 1, 0, NULL, 0)) + if (gfc_compare_interfaces (sym1, sym2, sym2->name, 1, 0, NULL, 0)) { gfc_error ("'%s' and '%s' for GENERIC '%s' at %L are ambiguous", sym1->name, sym2->name, generic_name, &where); |