trans-intrinsic.c (gfc_conv_intrinsic_repeat): Convert arguments to gfc_charlen_type_node.
2007-07-12 Richard Guenther <rguenther@suse.de> * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Convert arguments to gfc_charlen_type_node. * trans-io.c (gfc_convert_array_to_string): Convert type size to gfc_array_index_type. From-SVN: r126575
This commit is contained in:
parent
176be57bea
commit
553b66ad1d
|
@ -1,3 +1,10 @@
|
||||||
|
2007-07-12 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
|
* trans-intrinsic.c (gfc_conv_intrinsic_repeat): Convert
|
||||||
|
arguments to gfc_charlen_type_node.
|
||||||
|
* trans-io.c (gfc_convert_array_to_string): Convert type
|
||||||
|
size to gfc_array_index_type.
|
||||||
|
|
||||||
2007-07-12 Daniel Franke <franke.daniel@gmail.com>
|
2007-07-12 Daniel Franke <franke.daniel@gmail.com>
|
||||||
|
|
||||||
PR fortran/32634
|
PR fortran/32634
|
||||||
|
|
|
@ -3570,7 +3570,9 @@ gfc_conv_intrinsic_repeat (gfc_se * se, gfc_expr * expr)
|
||||||
&se->pre, &expr->where);
|
&se->pre, &expr->where);
|
||||||
|
|
||||||
/* Compute the destination length. */
|
/* Compute the destination length. */
|
||||||
dlen = fold_build2 (MULT_EXPR, gfc_charlen_type_node, slen, ncopies);
|
dlen = fold_build2 (MULT_EXPR, gfc_charlen_type_node,
|
||||||
|
fold_convert (gfc_charlen_type_node, slen),
|
||||||
|
fold_convert (gfc_charlen_type_node, ncopies));
|
||||||
type = gfc_get_character_type (expr->ts.kind, expr->ts.cl);
|
type = gfc_get_character_type (expr->ts.kind, expr->ts.cl);
|
||||||
dest = gfc_conv_string_tmp (se, build_pointer_type (type), dlen);
|
dest = gfc_conv_string_tmp (se, build_pointer_type (type), dlen);
|
||||||
|
|
||||||
|
@ -3594,7 +3596,8 @@ gfc_conv_intrinsic_repeat (gfc_se * se, gfc_expr * expr)
|
||||||
gfc_add_expr_to_block (&body, tmp);
|
gfc_add_expr_to_block (&body, tmp);
|
||||||
|
|
||||||
/* Call memmove (dest + (i*slen), src, slen). */
|
/* Call memmove (dest + (i*slen), src, slen). */
|
||||||
tmp = fold_build2 (MULT_EXPR, gfc_charlen_type_node, slen,
|
tmp = fold_build2 (MULT_EXPR, gfc_charlen_type_node,
|
||||||
|
fold_convert (gfc_charlen_type_node, slen),
|
||||||
fold_convert (gfc_charlen_type_node, count));
|
fold_convert (gfc_charlen_type_node, count));
|
||||||
tmp = fold_build2 (POINTER_PLUS_EXPR, pchar_type_node,
|
tmp = fold_build2 (POINTER_PLUS_EXPR, pchar_type_node,
|
||||||
fold_convert (pchar_type_node, dest),
|
fold_convert (pchar_type_node, dest),
|
||||||
|
|
|
@ -623,7 +623,8 @@ gfc_convert_array_to_string (gfc_se * se, gfc_expr * e)
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp = TYPE_SIZE_UNIT (gfc_get_element_type (type));
|
tmp = TYPE_SIZE_UNIT (gfc_get_element_type (type));
|
||||||
size = fold_build2 (MULT_EXPR, gfc_array_index_type, size, tmp);
|
size = fold_build2 (MULT_EXPR, gfc_array_index_type, size,
|
||||||
|
fold_convert (gfc_array_index_type, tmp));
|
||||||
|
|
||||||
se->string_length = fold_convert (gfc_charlen_type_node, size);
|
se->string_length = fold_convert (gfc_charlen_type_node, size);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue