re PR fortran/41297 (Functions are called twice)
authorRichard Guenther <rguenther@suse.de>
Wed, 9 Sep 2009 20:03:49 +0000 (20:03 +0000)
committerPaul Thomas <pault@gcc.gnu.org>
Wed, 9 Sep 2009 20:03:49 +0000 (20:03 +0000)
2009-09-09  Richard Guenther  <rguenther@suse.de>

PR fortran/41297
* trans-expr.c (gfc_trans_scalar_assign): Correct typo that
left 'tmp' unused in derived type assignment.

From-SVN: r151576

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

index d2a301d..c01c4b3 100644 (file)
@@ -1,3 +1,9 @@
+2009-09-09  Richard Guenther  <rguenther@suse.de>
+
+       PR fortran/41297
+       * trans-expr.c (gfc_trans_scalar_assign): Correct typo that
+       left 'tmp' unused in derived type assignment.
+
 2009-09-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
        PR fortran/41197
index 3d675eb..b3642c2 100644 (file)
@@ -4460,7 +4460,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), rse->expr);
+      tmp = fold_build1 (VIEW_CONVERT_EXPR, TREE_TYPE (lse->expr), tmp);
       gfc_add_modify (&block, lse->expr, tmp);
     }
   else