re PR middle-end/58742 (pointer arithmetic simplification)
authorRichard Biener <rguenther@suse.de>
Mon, 21 Oct 2013 11:34:04 +0000 (11:34 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 21 Oct 2013 11:34:04 +0000 (11:34 +0000)
commitd480e6a572799f809744075cdf447f959753b173
treed39c87a3db103241526f21769916ac517ea36d8f
parent54f9aba03140c7cdace8ff3c6847af855764656f
re PR middle-end/58742 (pointer arithmetic simplification)

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.

From-SVN: r203890
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/fold-divmul-1.c [new file with mode: 0644]