Commit 8132af9d by Steven G. Kargl

re PR fortran/85542 (ICE in check_inquiry, at fortran/expr.c:2426)

2018-05-11  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/85542
	* expr.c (check_inquiry): Avoid NULL pointer dereference.
 
2018-05-11  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/85542
	* gfortran.dg/pr85542.f90: New test.

From-SVN: r260182
parent b5f52fb1
2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85542
* expr.c (check_inquiry): Avoid NULL pointer dereference.
2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85687
......
......@@ -2422,7 +2422,7 @@ check_inquiry (gfc_expr *e, int not_restricted)
/* Assumed character length will not reduce to a constant expression
with LEN, as required by the standard. */
if (i == 5 && not_restricted
if (i == 5 && not_restricted && ap->expr->symtree
&& ap->expr->symtree->n.sym->ts.type == BT_CHARACTER
&& (ap->expr->symtree->n.sym->ts.u.cl->length == NULL
|| ap->expr->symtree->n.sym->ts.deferred))
......
2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85542
* gfortran.dg/pr85542.f90: New test.
2018-05-11 Martin Jambor <mjambor@suse.cz>
PR ipa/85655
......
! { dg-do compile }
! PR fortran/85542
function f(x)
character(*), intent(in) :: x
character((len((x)))) :: f
f = x
end
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