On Wed, Oct 15, 2014 at 03:00:57PM +0200, Richard Biener wrote: > To re-iterate here (as I expect most people will only look > at [0/n] patches ;)), the question is whether we are fine > with making fold-const (thus fold_{unary,binary,ternary}) > not handle some cases it handles currently.
I'd say not dealing with side-effects should be smaller problem than looking through casts etc., expressions with side-effects generally shouldn't be folding into constants, where I'd expect the highest risks (something previously folded into constants and used in initializers not working any longer, or __builtin_constant_p, etc.). I'd say just trying hard not to regress, and adding testsuite coverage where not already covered, should be good enough, if something important regresses, hopefully mass rebuilds will reveal it or users report it to us. Jakub