OSDN Git Service

2009-10-18 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 19 Oct 2009 08:45:43 +0000 (08:45 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 19 Oct 2009 08:45:43 +0000 (08:45 +0000)
PR fortran/41494
* trans-expr.c (gfc_trans_scalar_assign): Do not call
gfc_evaluate_now.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152973 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fortran/ChangeLog
gcc/fortran/trans-expr.c

index 24e83e6..b90f9c5 100644 (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>
 
index 331ca6a..dc58dbf 100644 (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