2011-08-03 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Aug 2011 13:33:28 +0000 (13:33 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 Aug 2011 13:33:28 +0000 (13:33 +0000)
commit105f72b0a8bd8fe5cbc440cbc413411fecf5b3f3
tree8d726f330bfaa34d014e6f7a8736038a869c9858
parenta52a801dbb21f7fd58673c52ab1398fcec1bb3bc
2011-08-03  Richard Guenther  <rguenther@suse.de>

PR middle-end/49958
* fold-const.c (fold_binary_loc): Only associate
(+ (+ (* a b) c) (* d e)) as (+ (+ (* a b) (* d e)) c) if
overflow wraps.

        * gcc.dg/torture/pr49958.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177270 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr49958.c [new file with mode: 0644]