+2014-01-08 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/58182
+ * resolve.c (gfc_verify_binding_labels): Modify order of checks.
+
2014-01-06 Janus Weil <janus@gcc.gnu.org>
PR fortran/59589
&& ((gsym->type != GSYM_SUBROUTINE && gsym->type != GSYM_FUNCTION)
|| (gsym->defined && sym->attr.if_source != IFSRC_IFBODY))
&& sym != gsym->ns->proc_name
- && (strcmp (gsym->sym_name, sym->name) != 0
- || module != gsym->mod_name
+ && (module != gsym->mod_name
+ || strcmp (gsym->sym_name, sym->name) != 0
|| (module && strcmp (module, gsym->mod_name) != 0)))
{
- /* Print an error if the procdure is defined multiple times; we have to
+ /* Print an error if the procedure is defined multiple times; we have to
exclude references to the same procedure via module association or
multiple checks for the same procedure. */
gfc_error ("Procedure %s with binding label %s at %L uses the same "
+2014-01-08 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/58182
+ * gfortran.dg/binding_label_tests_26a.f90: New.
+ * gfortran.dg/binding_label_tests_26b.f90: New.
+
2014-01-08 Marek Polacek <polacek@redhat.com>
PR sanitizer/59667
--- /dev/null
+! { dg-do compile }
+!
+! PR 58182: [4.9 Regression] ICE with global binding name used as a FUNCTION
+!
+! Contributed by Andrew Bensons <abensonca@gmail.com>
+!
+! This file must be compiled BEFORE binding_label_tests_26b.f90, which it
+! should be because dejagnu will sort the files.
+
+module fg
+contains
+ function fffi(f)
+ interface
+ function f() bind(c)
+ end function
+ end interface
+ end function
+end module
+
+! { dg-final { keep-modules "" } }
--- /dev/null
+! { dg-do compile }
+!
+! PR 58182: [4.9 Regression] ICE with global binding name used as a FUNCTION
+!
+! Contributed by Andrew Bensons <abensonca@gmail.com>
+!
+! This file must be compiled AFTER binding_label_tests_26a.f90, which it
+! should be because dejagnu will sort the files.
+
+module f ! { dg-error "uses the same global identifier" }
+ use fg ! { dg-error "uses the same global identifier" }
+end module
+
+! { dg-final { cleanup-modules "fg f" } }