[Bug tree-optimization/15791] fold misses that two ADDR_EXPR of an arrary obvious not equal
rguenth at tat dot physik dot uni-tuebingen dot de
gcc-bugzilla@gcc.gnu.org
Wed Jan 26 16:17:00 GMT 2005
------- Additional Comments From rguenth at tat dot physik dot uni-tuebingen dot de 2005-01-26 16:16 -------
Umm, no. We fold the ARRAY_REF comparison to
PLUS_EXPR(ADDR_EXPR, INTEGER_CST) == PLUS_EXPR(ADDR_EXPR, INTEGER_CST)
oh well ;) So I guess transforming &a + i truth_op &a + j to i truth_op j
is always correct, as &a - &a == 0.
For &b[1] == b though, we'll have to do more checks for this.
Patch attached, bootstrap and testing in progress.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15791
More information about the Gcc-bugs
mailing list