re PR middle-end/44809 (Mozilla build fails in gimplification.)

2010-07-04  Richard Guenther  <rguenther@suse.de>

	PR middle-end/44809
	* gimplify.c (gimplify_expr): Properly build a MEM_REF instead
	of an INDIRECT_REF.

	* g++.dg/torture/pr44809.C: New testcase.

From-SVN: r161803
This commit is contained in:
Richard Guenther 2010-07-04 16:55:40 +00:00 committed by Richard Biener
parent 17fc049f34
commit 7f5ad6d757
4 changed files with 18 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2010-07-04 Richard Guenther <rguenther@suse.de>
PR middle-end/44809
* gimplify.c (gimplify_expr): Properly build a MEM_REF instead
of an INDIRECT_REF.
2010-07-04 Richard Guenther <rguenther@suse.de>
PR tree-optimization/44479

View File

@ -7416,7 +7416,7 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
that temporary. */
tmp = build_fold_addr_expr_loc (input_location, *expr_p);
gimplify_expr (&tmp, pre_p, post_p, is_gimple_reg, fb_rvalue);
*expr_p = build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (tmp)), tmp);
*expr_p = build_simple_mem_ref (tmp);
}
else if ((fallback & fb_rvalue) && is_gimple_reg_rhs_or_call (*expr_p))
{

View File

@ -1,3 +1,8 @@
2010-07-04 Richard Guenther <rguenther@suse.de>
PR middle-end/44809
* g++.dg/torture/pr44809.C: New testcase.
2010-07-04 Richard Guenther <rguenther@suse.de>
PR tree-optimization/44656

View File

@ -0,0 +1,6 @@
// { dg-do compile }
unsigned int mEvictionRank[(1 << 5)];
void Unswap(int i)
{
mEvictionRank[i] = ({ unsigned int __v = i; __v; });
}