Re: [PATCH][RFC] Fix PR57656

2013-09-03 Thread Richard Biener
On Mon, 24 Jun 2013, Richard Biener wrote: This fixes the miscompile in PR57656 - folding of int t = 1 - (a - b) / c; to int t = (b - a) / c + 1; which introduces intermediate undefined overflow for a == -1 and b == INT_MAX. There seems to be a mix of assumptions of the

[PATCH][RFC] Fix PR57656

2013-06-24 Thread Richard Biener
This fixes the miscompile in PR57656 - folding of int t = 1 - (a - b) / c; to int t = (b - a) / c + 1; which introduces intermediate undefined overflow for a == -1 and b == INT_MAX. There seems to be a mix of assumptions of the context negate_expr_p is called in - for example the