https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69811
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Note that with 4.9 GENERIC still has
if ((char *) "a" + 1 == 0B)
but gimplification "simplifies" this to
if (&MEM[(void *)"a" + 1B] == 0B) goto <D.1747>; else goto <D.1748>;
which we eventually fold during CFG cleanup.
We've consciously removed that "simplification" and thus we get the following
after gimplification:
D.1835 = "a" + 1;
if (D.1835 == 0B) goto <D.1836>; else goto <D.1837>;
which is not re-combined at -O0.
Probably caused by
2014-09-05 Richard Biener <[email protected]>
PR middle-end/63148
* fold-const.c (try_move_mult_to_index): Remove.
(fold_binary_loc): Do not call it.
* tree-data-ref.c (dr_analyze_indices): Strip conversions
from the base object again.
Not sure if there is anything important to see here (it's -O0 after all).
For GCC 7 I plan to recover from this a bit by gimplifying to SSA and
allow stmt combining simplifications at gimplification time.