re PR fortran/87907 (ICE in resolve_contained_fntype, at fortran/resolve.c:587)
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
This commit is contained in:
parent
33f0ad50f4
commit
ee3aab6826
@ -1,3 +1,9 @@
|
|||||||
|
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>
|
2019-06-19 Jim MacArthur <jim.macarthur@codethink.co.uk>
|
||||||
Mark Eggleston <mark.eggleston@codethink.com>
|
Mark Eggleston <mark.eggleston@codethink.com>
|
||||||
|
|
||||||
|
@ -583,6 +583,9 @@ resolve_contained_fntype (gfc_symbol *sym, gfc_namespace *ns)
|
|||||||
|| sym->attr.entry_master)
|
|| sym->attr.entry_master)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!sym->result)
|
||||||
|
return;
|
||||||
|
|
||||||
/* Try to find out of what the return type is. */
|
/* Try to find out of what the return type is. */
|
||||||
if (sym->result->ts.type == BT_UNKNOWN && sym->result->ts.interface == NULL)
|
if (sym->result->ts.type == BT_UNKNOWN && sym->result->ts.interface == NULL)
|
||||||
{
|
{
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
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>
|
2019-06-19 Wilco Dijkstra <wdijkstr@arm.com>
|
||||||
|
|
||||||
PR middle-end/84521
|
PR middle-end/84521
|
||||||
|
23
gcc/testsuite/gfortran.dg/pr87907.f90
Normal file
23
gcc/testsuite/gfortran.dg/pr87907.f90
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
! { 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
|
Loading…
Reference in New Issue
Block a user