[PATCH] rs6000: Fix signed integer overflows

David Edelsohn dje.gcc@gmail.com
Wed Nov 19 16:36:00 GMT 2014


On Wed, Nov 19, 2014 at 10:24 AM, Markus Trippelsdorf
<markus@trippelsdorf.de> wrote:
> bootstrap-ubsan on gcc112 shows a couple of signed integer overflows:

> The fix was tested on powerpc64-unknown-linux-gnu.
> OK for trunk?
>
> Thank you.
>
> 2014-11-19  Markus Trippelsdorf  <markus@trippelsdorf.de>
>
>         * config/rs6000/constraints.md: Avoid signed integer overflows.
>         * config/rs6000/predicates.md: Likewise.

This is okay.  IN_RANGE is clearer, but you don't have to clean up comparison.

UINTVAL is prettier, but not necessary.  A lot of code in GCC is not
careful about that.

Thanks, David



More information about the Gcc-patches mailing list