re PR tree-optimization/17598 (an extra addition when comparing address of &a->b...
authorRichard Guenther <rguenth@gcc.gnu.org>
Tue, 26 Apr 2005 16:35:31 +0000 (16:35 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 26 Apr 2005 16:35:31 +0000 (16:35 +0000)
commit70a390bbb670c358e1f933ef8e75a3a3d7ca8fa5
tree75a85c6c78844dca9ea04acfe5326683bc8d8c99
parent866af8a90915d8ed191ab7af616b3a186c28cae4
re PR tree-optimization/17598 (an extra addition when comparing address of &a->b and &c->b.)

2004-04-26  Richard Guenther  <rguenth@gcc.gnu.org>

PR tree-optimization/17598
* fold-const.c (fold_binary): Fold comparisons of addresses
of COMPONENT_REFs which reference the same field to
comparisons of the addresses of the base objects.

* gcc.dg/tree-ssa/pr17598.c: New testcase.

From-SVN: r98775
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr17598.c [new file with mode: 0644]