aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-sra.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r--gcc/tree-sra.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index a6a1a90..8fdbb72 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -2441,7 +2441,8 @@ sra_modify_assign (gimple *stmt, gimple_stmt_iterator *gsi,
if (!useless_type_conversion_p (TREE_TYPE (lhs), TREE_TYPE (rhs)))
{
rhs = fold_build1_loc (loc, VIEW_CONVERT_EXPR, TREE_TYPE (lhs), rhs);
- if (!is_gimple_reg (lhs))
+ if (is_gimple_reg_type (TREE_TYPE (lhs))
+ && TREE_CODE (lhs) != SSA_NAME)
force_gimple_rhs = true;
}
}