This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] rs6000: Fix signed integer overflows


On 2014.11.19 at 11:20 -0500, David Edelsohn wrote:
> 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 for all the comments. I've checked in the original patch, but feel free
to follow up with aesthetic improvements.

-- 
Markus


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]