re PR tree-optimization/26763 (wrong final value of induction variable calculated)
authorRichard Guenther <rguenther@suse.de>
Wed, 5 Apr 2006 08:16:38 +0000 (08:16 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 5 Apr 2006 08:16:38 +0000 (08:16 +0000)
commit6eee98936968c67edc8d9190b215819498840b57
tree45b8361ffc4c1c5d575d89fb35f70ef96623e1d1
parent80521187ef59a2d150007032f04c2ccdeb59afe1
re PR tree-optimization/26763 (wrong final value of induction variable calculated)

2006-04-05  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/26763
* fold-const.c (fold_comparison): Move folding of
PTR + CST CMP PTR + CST ...
(fold_binary): ... here.  Fold only for EQ_EXPR and NE_EXPR.

* gcc.dg/torture/pr26763-1.c: New testcase.
* gcc.dg/torture/pr26763-2.c: Likewise.

From-SVN: r112697
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr26763-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pr26763-2.c [new file with mode: 0644]