Re: poly_span_traits fixes (PR 84811)

2018-03-21 Thread Richard Biener
On Wed, Mar 21, 2018 at 9:31 AM, Richard Sandiford wrote: > This patch fixes incorrect results for HOST_WIDE_INT positions > at opposite extremes when used with HOST_WIDE_INT sizes. It also > fixes UB when comparing such positions with unsigned HOST_WIDE_INT > sizes (although the results in that

poly_span_traits fixes (PR 84811)

2018-03-21 Thread Richard Sandiford
This patch fixes incorrect results for HOST_WIDE_INT positions at opposite extremes when used with HOST_WIDE_INT sizes. It also fixes UB when comparing such positions with unsigned HOST_WIDE_INT sizes (although the results in that case were wrapv-correct). Tested on aarch64-linux-gnu and x86_64-l