aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-sra.c
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2013-01-04 14:20:38 +0100
committerMartin Jambor <jamborm@gcc.gnu.org>2013-01-04 14:20:38 +0100
commit87eab55418a76e2912b8b2d1e1acb0f37c137017 (patch)
tree36dbf3acb2f58a0929719fd035fe57a3dfc6e32c /gcc/tree-sra.c
parent90d04a445cb821407e109da069ac93cd5ff3031f (diff)
downloadgcc-87eab55418a76e2912b8b2d1e1acb0f37c137017.zip
gcc-87eab55418a76e2912b8b2d1e1acb0f37c137017.tar.gz
gcc-87eab55418a76e2912b8b2d1e1acb0f37c137017.tar.bz2
re PR tree-optimization/55755 (Invalid VIEW_CONVERT_EXPR produced by SRA)
2013-01-04 Martin Jambor <mjambor@suse.cz> PR tree-optimization/55755 * tree-sra.c (sra_modify_assign): Do not check that an access has no children when trying to avoid producing a VIEW_CONVERT_EXPR. testsuite/ * gcc.dg/torture/pr55755.c: New test. * gcc.dg/tree-ssa/sra-13.c: Likewise. * gcc.dg/tree-ssa/pr45144.c: Update. From-SVN: r194905
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r--gcc/tree-sra.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 286ef26..9c75393 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -3087,15 +3087,13 @@ sra_modify_assign (gimple *stmt, gimple_stmt_iterator *gsi)
??? This should move to fold_stmt which we simply should
call after building a VIEW_CONVERT_EXPR here. */
if (AGGREGATE_TYPE_P (TREE_TYPE (lhs))
- && !contains_bitfld_comp_ref_p (lhs)
- && !access_has_children_p (lacc))
+ && !contains_bitfld_comp_ref_p (lhs))
{
lhs = build_ref_for_model (loc, lhs, 0, racc, gsi, false);
gimple_assign_set_lhs (*stmt, lhs);
}
else if (AGGREGATE_TYPE_P (TREE_TYPE (rhs))
- && !contains_vce_or_bfcref_p (rhs)
- && !access_has_children_p (racc))
+ && !contains_vce_or_bfcref_p (rhs))
rhs = build_ref_for_model (loc, rhs, 0, lacc, gsi, false);
if (!useless_type_conversion_p (TREE_TYPE (lhs), TREE_TYPE (rhs)))