On Wed, 10 Oct 2012, Jakub Jelinek wrote: > On Wed, Oct 10, 2012 at 10:21:59AM +0200, Richard Biener wrote: > > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > > > Err, why? Can't we negate a constant, too? > > Not all of them, say INT_MIN can't be negated. > Though, > int > foo (int n) > { > int i, d; > for (i = 0, d = 0; i < n; i++) > d -= -__INT_MAX__ - 1; > return d; > } > doesn't trigger it. And for constants I thought it would be better to > just fold it immediately.
Yeah, I meant we can negate all constants by doing tem = - CONSTANT; right? Or wait ... even if we have red = x - y; if y is INT_MIN then the code we just created may have introduced undefined overflow (of course you could argue that with x - y it is very likely that undefined overflow already happened) ... > > The ICE simply means > > we should have used make_temp_ssa_name (TREE_TYPE (rhs), NULL, NULL) > > instead of copy_ssa_name. > > Is make_temp_ssa_name (TREE_TYPE (rhs), NULL, NULL) preferrable over just > make_ssa_name (TREE_TYPE (rhs), NULL); ? Ah, no, make_ssa_name (TREE_TYPE (rhs), NULL) is even better. On the 4.7 branch you need to create a new temp var ... Richard.