[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
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 == b though, we'll have to do more checks for this.
Patch attached, bootstrap and testing in progress.
More information about the Gcc-bugs