Commit 482768bd by Thomas Koenig

re PR fortran/84957 (ICE in gfc_sym_type, at fortran/trans-types.c:2255)

2018-03-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
	Harald Anlauf  <anlauf@gmx.de>

	PR fortran/84957
	* trans-types.c (gfc_sym_type): Do not dereference NULL pointer.

2018-03-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
	Harald Anlauf  <anlauf@gmx.de>

	PR fortran/84957
	* gfortran.dg/pr84957.f90: New test.


Co-Authored-By: Harald Anlauf <anlauf@gmx.de>

From-SVN: r258745
parent 3e129b5b
2018-03-21 Thomas Koenig <tkoenig@gcc.gnu.org>
Harald Anlauf <anlauf@gmx.de>
PR fortran/84957
* trans-types.c (gfc_sym_type): Do not dereference NULL pointer.
2018-03-21 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/84615
......
......@@ -2252,6 +2252,7 @@ gfc_sym_type (gfc_symbol * sym)
&& sym->ts.type == BT_CHARACTER
&& sym->ts.u.cl->backend_decl == NULL_TREE
&& sym->ns->proc_name
&& sym->ns->proc_name->ts.u.cl
&& sym->ns->proc_name->ts.u.cl->backend_decl != NULL_TREE)
sym->ts.u.cl->backend_decl = sym->ns->proc_name->ts.u.cl->backend_decl;
......
2018-03-21 Thomas Koenig <tkoenig@gcc.gnu.org>
Harald Anlauf <anlauf@gmx.de>
PR fortran/84957
* gfortran.dg/pr84957.f90: New test.
2018-03-21 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/84960
......
! { dg-do compile }
! PR 84957
!
! Testcase derived from PR by G. Steinmetz <gscfq@t-online.de>
!
function f() result(u)
entry g() result(v)
contains
function v(x) result(z)
character :: x(2)
character(sum(len_trim(x))) :: z
end function v
function u(x) result(z)
character :: x(2)
character(sum(len_trim(x))) :: z
end function u
end function f
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment