re PR middle-end/50628 (gfortran.fortran-torture/execute/entry_4.f90 fails)

2011-12-13  Martin Jambor  <mjambor@suse.cz>

	PR middle-end/50628
	* tree-sra.c (propagate_subaccesses_across_link): Do not propagate
	sub-accesses of scalar accesses.

From-SVN: r182289
This commit is contained in:
Martin Jambor 2011-12-13 17:08:14 +01:00 committed by Martin Jambor
parent 0318fc7749
commit d370518679
2 changed files with 21 additions and 13 deletions

View File

@ -1,3 +1,9 @@
2011-12-13 Martin Jambor <mjambor@suse.cz>
PR middle-end/50628
* tree-sra.c (propagate_subaccesses_across_link): Do not propagate
sub-accesses of scalar accesses.
2011-12-13 Martin Jambor <mjambor@suse.cz> 2011-12-13 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/51362 PR tree-optimization/51362

View File

@ -2266,14 +2266,15 @@ propagate_subaccesses_across_link (struct access *lacc, struct access *racc)
|| racc->grp_unscalarizable_region) || racc->grp_unscalarizable_region)
return false; return false;
if (!lacc->first_child && !racc->first_child if (is_gimple_reg_type (racc->type))
&& is_gimple_reg_type (racc->type)) {
if (!lacc->first_child && !racc->first_child)
{ {
tree t = lacc->base; tree t = lacc->base;
lacc->type = racc->type; lacc->type = racc->type;
if (build_user_friendly_ref_for_offset (&t, TREE_TYPE (t), lacc->offset, if (build_user_friendly_ref_for_offset (&t, TREE_TYPE (t),
racc->type)) lacc->offset, racc->type))
lacc->expr = t; lacc->expr = t;
else else
{ {
@ -2282,6 +2283,7 @@ propagate_subaccesses_across_link (struct access *lacc, struct access *racc)
racc, NULL, false); racc, NULL, false);
lacc->grp_no_warning = true; lacc->grp_no_warning = true;
} }
}
return false; return false;
} }