mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-19 10:39:54 +08:00
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
This commit is contained in:
parent
1321e7aec6
commit
5cd8e1235a
@ -1,3 +1,7 @@
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user