re PR fortran/41494 (temp and memcpy used when zeroing array)

2009-10-18  Richard Guenther  <rguenther@suse.de>

	PR fortran/41494
	* trans-expr.c (gfc_trans_scalar_assign): Do not call
	gfc_evaluate_now.

From-SVN: r152973
This commit is contained in:
Richard Guenther 2009-10-19 08:45:43 +00:00 committed by Richard Biener
parent 2d3fc6aafc
commit 94990acabe
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2009-10-19 Richard Guenther <rguenther@suse.de>
PR fortran/41494
* trans-expr.c (gfc_trans_scalar_assign): Do not call
gfc_evaluate_now.
2009-10-17 Janus Weil <janus@gcc.gnu.org>
Paul Thomas <pault@gcc.gnu.org>

View File

@ -4664,8 +4664,7 @@ gfc_trans_scalar_assign (gfc_se * lse, gfc_se * rse, gfc_typespec ts,
{
gfc_add_block_to_block (&block, &lse->pre);
gfc_add_block_to_block (&block, &rse->pre);
tmp = gfc_evaluate_now (rse->expr, &block);
tmp = fold_build1 (VIEW_CONVERT_EXPR, TREE_TYPE (lse->expr), tmp);
tmp = fold_build1 (VIEW_CONVERT_EXPR, TREE_TYPE (lse->expr), rse->expr);
gfc_add_modify (&block, lse->expr, tmp);
}
else