+2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
+
+ PR fortran/84740
+ * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
+ LHS type when assigning.
+
2018-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/83742
if (first_len)
{
gfc_add_modify (&se->pre, first_len_val,
- se->string_length);
+ fold_convert (TREE_TYPE (first_len_val),
+ se->string_length));
first_len = false;
}
else
length. */
tree cond = fold_build2_loc (input_location, NE_EXPR,
logical_type_node, first_len_val,
- se->string_length);
+ fold_convert (TREE_TYPE
+ (first_len_val),
+ se->string_length));
gfc_trans_runtime_check
(true, false, cond, &se->pre, &expr->where,
"Different CHARACTER lengths (%ld/%ld) in array constructor",