]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/42684 (ICE when interface operator(xx) available through host and use...
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Fri, 15 Jan 2010 01:47:43 +0000 (01:47 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Fri, 15 Jan 2010 01:47:43 +0000 (01:47 +0000)
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

gcc/fortran/ChangeLog
gcc/fortran/interface.c
gcc/fortran/resolve.c

index 204d242022159e1e6170d1f07a3030343d44ad81..af85555a2e7ec2325ff319b70a9908f827e75d20 100644 (file)
@@ -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
index 0034f75b92e9751f331ee638ec1babde9f0720d2..2a5ece1c465e0eab4c7bfb02c6f4521f3c9b4398 100644 (file)
@@ -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)
index 7321c0dd7675de5a83426cf9332f597fdff73595..9212521b2f39654164295637aeb82a7c3dfa9297 100644 (file)
@@ -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);