Commit 72038310 authored by kargl's avatar kargl
Browse files

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

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



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115463 138bc75d-0d04-0410-961f-82ee72b054a4
parent b13f1dbf
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