[Bug tree-optimization/41244] "&data[i] - data" isn't converted to "i"

glisse at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Jul 1 21:05:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41244

--- Comment #5 from Marc Glisse <glisse at gcc dot gnu.org> ---
If we write &data[i] - &data[0] instead of &data[i] - data, we hit the special
case in fold_binary_loc /* Fold &a[i] - &a[j] to i-j.  */ which leads to
fold_addr_of_array_ref_difference.


More information about the Gcc-bugs mailing list