2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/65453
* decl.c (get_proc_name): Catch clash between a procedure statement
and a contained subprogram
2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/65453
* gfortran.dg/pr65453.f90: New test.
From-SVN: r258632
+2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/65453
+ * decl.c (get_proc_name): Catch clash between a procedure statement
+ and a contained subprogram
+
2018-03-16 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/69395
gfc_error_now ("Procedure %qs at %C is already defined at %L",
name, &sym->declared_at);
+ if (sym->attr.external && sym->attr.procedure
+ && gfc_current_state () == COMP_CONTAINS)
+ gfc_error_now ("Contained procedure %qs at %C clashes with "
+ "procedure defined at %L",
+ name, &sym->declared_at);
+
/* Trap a procedure with a name the same as interface in the
encompassing scope. */
if (sym->attr.generic != 0
+2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/65453
+ * gfortran.dg/pr65453.f90: New test.
+
2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/84913
--- /dev/null
+! { dg-do compile }
+! PR fortran/65453
+! Contributed by Tobias Burnus <burnus at gcc.gnu.org>
+procedure() :: foo ! { dg-error "(1)" }
+ contains
+ subroutine foo() ! { dg-error "clashes with procedure" }
+ end
+end