Commit e10e60cb by Janne Blomqvist

PR 83740 Wrong string length type in bounds check

This patch fixes up the formatting and corrects the PR number in the
ChangeLog for r256425.

gcc/fortran/ChangeLog:

2018-01-10  Janne Blomqvist  <jb@gcc.gnu.org>

	PR fortran/83740
	* trans-array.c (gfc_trans_array_ctor_element): Fix formatting.

From-SVN: r256426
parent 85c2c761
2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/84740
PR fortran/83740
* trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/83740
* trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
LHS type when assigning.
......
......@@ -1570,11 +1570,11 @@ gfc_trans_array_ctor_element (stmtblock_t * pblock, tree desc,
{
/* Verify that all constructor elements are of the same
length. */
tree rhs = fold_convert (TREE_TYPE (first_len_val),
se->string_length);
tree cond = fold_build2_loc (input_location, NE_EXPR,
logical_type_node, first_len_val,
fold_convert (TREE_TYPE
(first_len_val),
se->string_length));
rhs);
gfc_trans_runtime_check
(true, false, cond, &se->pre, &expr->where,
"Different CHARACTER lengths (%ld/%ld) in array constructor",
......
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