Commit 26fbc975 by Jerry DeLisle Committed by François-Xavier Coudert

re PR fortran/31251 (Non-integer character length leads to segfault)

	PR fortran/31251
	* simplify.c (gfc_simplify_len): Only simplify integer lengths.

From-SVN: r124415
parent e4fae5f7
2007-05-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/31251
* simplify.c (gfc_simplify_len): Only simplify integer lengths.
2007-05-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> 2007-05-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/31781 PR fortran/31781
......
...@@ -2136,7 +2136,8 @@ gfc_simplify_len (gfc_expr *e) ...@@ -2136,7 +2136,8 @@ gfc_simplify_len (gfc_expr *e)
} }
if (e->ts.cl != NULL && e->ts.cl->length != NULL if (e->ts.cl != NULL && e->ts.cl->length != NULL
&& e->ts.cl->length->expr_type == EXPR_CONSTANT) && e->ts.cl->length->expr_type == EXPR_CONSTANT
&& e->ts.cl->length->ts.type == BT_INTEGER)
{ {
result = gfc_constant_result (BT_INTEGER, gfc_default_integer_kind, result = gfc_constant_result (BT_INTEGER, gfc_default_integer_kind,
&e->where); &e->where);
......
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