re PR tree-optimization/71631 (Wrong constant folding)
authorJakub Jelinek <jakub@redhat.com>
Sat, 25 Jun 2016 17:20:15 +0000 (19:20 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 25 Jun 2016 17:20:15 +0000 (19:20 +0200)
commit2a65e70bcfb000b229a2cbf54b06956108443598
treee8e53d72f842bb86f62249822f10a715435f81e8
parent7805417a5d2a9a79a3858b82d60169178f59c6f1
re PR tree-optimization/71631 (Wrong constant folding)

PR tree-optimization/71631
* tree-ssa-reassoc.c (reassociate_bb): Pass true as last argument
to rewrite_expr_tree even if negate_result, move new_lhs var
declaration and initialization earlier, for powi_result set afterwards
new_lhs to lhs.  For negate_result, use new_lhs instead of tmp
if new_lhs != lhs, and don't shadow gsi var.

* gcc.c-torture/execute/pr71631.c: New test.

From-SVN: r237782
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr71631.c [new file with mode: 0644]
gcc/tree-ssa-reassoc.c