Commit 5cd8e123 by Steven G. Kargl Committed by Steven G. Kargl

trans-expr.c (gfc_trans_string_copy): Evaluate the string lengths

2006-07-14  Steven G. Kargl  <kargls@comcast.net>

	* trans-expr.c (gfc_trans_string_copy): Evaluate the string lengths

From-SVN: r115463
parent 1321e7ae
2006-07-14 Steven G. Kargl <kargls@comcast.net>
* trans-expr.c (gfc_trans_string_copy): Evaluate the string lengths
006-07-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/28174
......
......@@ -2228,10 +2228,10 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym,
/* Generate code to copy a string. */
static void
gfc_trans_string_copy (stmtblock_t * block, tree dlen, tree dest,
tree slen, tree src)
gfc_trans_string_copy (stmtblock_t * block, tree dlength, tree dest,
tree slength, tree src)
{
tree tmp;
tree tmp, dlen, slen;
tree dsc;
tree ssc;
tree cond;
......@@ -2241,6 +2241,9 @@ gfc_trans_string_copy (stmtblock_t * block, tree dlen, tree dest,
tree tmp4;
stmtblock_t tempblock;
dlen = fold_convert (size_type_node, gfc_evaluate_now (dlength, block));
slen = fold_convert (size_type_node, gfc_evaluate_now (slength, block));
/* Deal with single character specially. */
dsc = gfc_to_single_character (dlen, dest);
ssc = gfc_to_single_character (slen, src);
......
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