summaryrefslogtreecommitdiff
path: root/gcc/tree-sra.c
diff options
context:
space:
mode:
authorjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-27 18:22:39 +0000
committerjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-27 18:22:39 +0000
commit49c38e9331980a340472cdad0c5de2f8bbf9c224 (patch)
tree7ff5b04eaa1b80005f086c7bd7ab9004f5039f7d /gcc/tree-sra.c
parent9bf1a5dd1346e377d5befae26e031f7e8e535aa9 (diff)
downloadgcc-49c38e9331980a340472cdad0c5de2f8bbf9c224.tar.gz
2012-03-27 Martin Jambor <mjambor@suse.cz>
PR middle-end/52693 * tree-sra.c (sra_modify_assign): Do not call load_assign_lhs_subreplacements when working with an unscalarizable region. * testsuite/gcc.dg/torture/pr52693.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185891 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r--gcc/tree-sra.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 4d1aa5f1eca..84dc3be27c8 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -3071,7 +3071,13 @@ sra_modify_assign (gimple *stmt, gimple_stmt_iterator *gsi)
}
else
{
- if (access_has_children_p (lacc) && access_has_children_p (racc))
+ if (access_has_children_p (lacc)
+ && access_has_children_p (racc)
+ /* When an access represents an unscalarizable region, it usually
+ represents accesses with variable offset and thus must not be used
+ to generate new memory accesses. */
+ && !lacc->grp_unscalarizable_region
+ && !racc->grp_unscalarizable_region)
{
gimple_stmt_iterator orig_gsi = *gsi;
enum unscalarized_data_handling refreshed;