summaryrefslogtreecommitdiffstats
path: root/gcc/fortran/trans-expr.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-25 13:44:57 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-25 13:44:57 +0000
commitbb982f6666cf2bf5e343ac9b910303a97019135c (patch)
treef31a521b266ab7c2fc65803ebeda79fb66969e8f /gcc/fortran/trans-expr.c
parentfe9b08a2c2202c07f1f02f83e8dfac36923b6662 (diff)
downloadppe42-gcc-bb982f6666cf2bf5e343ac9b910303a97019135c.tar.gz
ppe42-gcc-bb982f6666cf2bf5e343ac9b910303a97019135c.zip
2009-07-25 Richard Guenther <rguenther@suse.de>
PR fortran/40005 * trans-types.c (gfc_get_array_type_bounds): Use build_distinct_type_copy with a proper TYPE_CANONICAL and re-use the type-decl of the original type. * trans-decl.c (build_entry_thunks): Signal cgraph we may not garbage collect. (create_main_function): Likewise. (gfc_generate_function_code): Likewise. * trans-expr.c (gfc_trans_subcomponent_assign): Do not use fold_convert on record types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150079 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r--gcc/fortran/trans-expr.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 03902420e04..9bec2e10513 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -3763,9 +3763,7 @@ gfc_trans_subcomponent_assign (tree dest, gfc_component * cm, gfc_expr * expr)
se.want_pointer = 0;
gfc_conv_expr_descriptor (&se, expr, rss);
gfc_add_block_to_block (&block, &se.pre);
-
- tmp = fold_convert (TREE_TYPE (dest), se.expr);
- gfc_add_modify (&block, dest, tmp);
+ gfc_add_modify (&block, dest, se.expr);
if (cm->ts.type == BT_DERIVED && cm->ts.derived->attr.alloc_comp)
tmp = gfc_copy_alloc_comp (cm->ts.derived, se.expr, dest,
OpenPOWER on IntegriCloud