2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/87907
* resolve.c (resolve_contained_fntype): Do not dereference a NULL
pointer.
2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/87907
* gfortran.dg/pr87907.f90: New testcase.
From-SVN: r272480
+2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/87907
+ * resolve.c (resolve_contained_fntype): Do not dereference a NULL
+ pointer.
+
2019-06-19 Jim MacArthur <jim.macarthur@codethink.co.uk>
Mark Eggleston <mark.eggleston@codethink.com>
|| sym->attr.entry_master)
return;
+ if (!sym->result)
+ return;
+
/* Try to find out of what the return type is. */
if (sym->result->ts.type == BT_UNKNOWN && sym->result->ts.interface == NULL)
{
+2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/87907
+ * gfortran.dg/pr87907.f90: New testcase.
+
2019-06-19 Wilco Dijkstra <wdijkstr@arm.com>
PR middle-end/84521
--- /dev/null
+! { dg-do compile }
+! PR fortran/pr87907
+! Original testcase contributed by Gerhard Stienmetz <gscfq at t-online dot de>
+module m
+ interface
+ module function g(x) result(z)
+ integer, intent(in) :: x
+ integer, allocatable :: z
+ end
+ end interface
+end
+
+submodule(m) m2
+ contains
+ subroutine g(x) ! { dg-error "mismatch in argument" }
+ end
+end
+
+program p
+ use m ! { dg-error "has a type" }
+ integer :: x = 3
+ call g(x) ! { dg-error "which is not consistent with" }
+end