OSDN Git Service

2008-08-22 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 Aug 2008 12:43:49 +0000 (12:43 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 Aug 2008 12:43:49 +0000 (12:43 +0000)
commit67f36f785bf4cf1d9a79bd5e19f88e5016890e6a
tree3d71422e6cc09e286c8804aef278b4add145989a
parent9654d7b31e3f2f5c3649a0e0412231b27776e464
2008-08-22  Richard Guenther  <rguenther@suse.de>

PR middle-end/36548
PR middle-end/37125
* fold-const.c (extract_muldiv_1): Optimize (X * C1) % C2 only
if the multiplication does not overflow.

* gcc.c-torture/execute/pr37125.c: New testcase.

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