From 6df588cbd18d6721fae4c05db7d78a11c2c5af7d Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Fri, 26 Nov 2010 12:42:41 +0000 Subject: [PATCH] re PR lto/46664 (Failed to build 481.wrf in SPEC CPU 2006 with LTO) 2010-11-26 Richard Guenther PR tree-optimization/46664 * tree-affine.c (aff_combination_to_tree): Add rest last. From-SVN: r167173 --- gcc/ChangeLog | 5 +++++ gcc/tree-affine.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8cfc9633963..05c19eb173e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-11-26 Richard Guenther + + PR tree-optimization/46664 + * tree-affine.c (aff_combination_to_tree): Add rest last. + 2010-11-26 Michael Haubenwallner PR target/33637 diff --git a/gcc/tree-affine.c b/gcc/tree-affine.c index a02d56cdc8d..c57eaff2e95 100644 --- a/gcc/tree-affine.c +++ b/gcc/tree-affine.c @@ -434,7 +434,7 @@ tree aff_combination_to_tree (aff_tree *comb) { tree type = comb->type; - tree expr = comb->rest; + tree expr = NULL_TREE; unsigned i; double_int off, sgn; tree type1 = type; @@ -447,6 +447,9 @@ aff_combination_to_tree (aff_tree *comb) expr = add_elt_to_tree (expr, type, comb->elts[i].val, comb->elts[i].coef, comb); + if (comb->rest) + expr = add_elt_to_tree (expr, type, comb->rest, double_int_one, comb); + /* Ensure that we get x - 1, not x + (-1) or x + 0xff..f if x is unsigned. */ if (double_int_negative_p (comb->offset)) -- 2.30.2