Re: [PATCH] Move POINTER_PLUS_EXPR folding to fold-const.c

2014-08-07 Thread Richard Biener
On Wed, 6 Aug 2014, Marek Polacek wrote: > As discussed in the other thread, I can't just remove folding from the > C FE and implement it on GIMPLE level, because that regressed some of > those not-really-kosher static initializers. Instead, fold-const.c > has to be taught how to fold PTR0 - (PTR

[PATCH] Move POINTER_PLUS_EXPR folding to fold-const.c

2014-08-06 Thread Marek Polacek
As discussed in the other thread, I can't just remove folding from the C FE and implement it on GIMPLE level, because that regressed some of those not-really-kosher static initializers. Instead, fold-const.c has to be taught how to fold PTR0 - (PTR1 p+ A). (Now it sounds so obvious.) I added som