2013-10-21 Richard Biener <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Oct 2013 11:34:04 +0000 (11:34 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Oct 2013 11:34:04 +0000 (11:34 +0000)
commitfc8edbaa7e7d39994a98fc3705ab43e4695ac79e
treed39c87a3db103241526f21769916ac517ea36d8f
parent4e3be7254926d00c5625949c0d9b28049b279d2d
2013-10-21  Richard Biener  <rguenther@suse.de>

PR middle-end/58742
* fold-const.c (fold_binary_loc): Fold ((T) (X /[ex] C)) * C
to (T) X for sign-changing conversions (or no conversion).

* c-c++-common/fold-divmul-1.c: New testcase.

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