Re: Use unsigned(-1) for lshift

2013-06-26 Thread Marc Glisse
Ping (re-attaching the patch) 2013-06-26 Marc Glisse PR other/57324 * hwint.h (HOST_WIDE_INT_UC, HOST_WIDE_INT_1U, HOST_WIDE_INT_M1, HOST_WIDE_INT_M1U): New macros. * fold-const.c (sign_bit_p, build_range_check, fold_unary_loc, fold_binary_loc, fold_ter

Re: Use unsigned(-1) for lshift

2013-05-24 Thread Marc Glisse
On Sat, 25 May 2013, Segher Boessenkool wrote: Index: tree-ssa-structalias.c === --- tree-ssa-structalias.c (revision 199289) +++ tree-ssa-structalias.c (working copy) @@ -475,21 +475,21 @@ struct constraint_expr /* Off

Re: Use unsigned(-1) for lshift

2013-05-24 Thread Segher Boessenkool
Index: tree-ssa-structalias.c === --- tree-ssa-structalias.c (revision 199289) +++ tree-ssa-structalias.c (working copy) @@ -475,21 +475,21 @@ struct constraint_expr /* Offset, in bits, of this constraint from the beginn

Re: Use unsigned(-1) for lshift

2013-05-24 Thread Joseph S. Myers
On Fri, 24 May 2013, Richard Biener wrote: > On Thu, May 23, 2013 at 9:47 PM, Marc Glisse wrote: > > Hello, > > > > this is a simple patch to reduce a bit the noise in PR57324 (undefined > > behavior flagged by clang). I only handled some of the most obvious ones. > > Passes bootstrap+testsuite o

Re: Use unsigned(-1) for lshift

2013-05-24 Thread Marc Glisse
On Fri, 24 May 2013, Jakub Jelinek wrote: On Fri, May 24, 2013 at 10:15:29AM +0200, Richard Biener wrote: On Thu, May 23, 2013 at 9:47 PM, Marc Glisse wrote: Hello, this is a simple patch to reduce a bit the noise in PR57324 (undefined behavior flagged by clang). I only handled some of the m

Re: Use unsigned(-1) for lshift

2013-05-24 Thread Jakub Jelinek
On Fri, May 24, 2013 at 10:15:29AM +0200, Richard Biener wrote: > On Thu, May 23, 2013 at 9:47 PM, Marc Glisse wrote: > > Hello, > > > > this is a simple patch to reduce a bit the noise in PR57324 (undefined > > behavior flagged by clang). I only handled some of the most obvious ones. > > Passes b

Re: Use unsigned(-1) for lshift

2013-05-24 Thread Richard Biener
On Fri, May 24, 2013 at 10:33 AM, Marc Glisse wrote: > On Fri, 24 May 2013, Richard Biener wrote: > >> On Thu, May 23, 2013 at 9:47 PM, Marc Glisse wrote: >>> >>> Hello, >>> >>> this is a simple patch to reduce a bit the noise in PR57324 (undefined >>> behavior flagged by clang). I only handled s

Re: Use unsigned(-1) for lshift

2013-05-24 Thread Marc Glisse
On Fri, 24 May 2013, Richard Biener wrote: On Thu, May 23, 2013 at 9:47 PM, Marc Glisse wrote: Hello, this is a simple patch to reduce a bit the noise in PR57324 (undefined behavior flagged by clang). I only handled some of the most obvious ones. Passes bootstrap+testsuite on x86_64-linux-gnu

Re: Use unsigned(-1) for lshift

2013-05-24 Thread Richard Biener
On Thu, May 23, 2013 at 9:47 PM, Marc Glisse wrote: > Hello, > > this is a simple patch to reduce a bit the noise in PR57324 (undefined > behavior flagged by clang). I only handled some of the most obvious ones. > Passes bootstrap+testsuite on x86_64-linux-gnu. Hm, so ISO C99 says in 6.5.7/4 that

Use unsigned(-1) for lshift

2013-05-23 Thread Marc Glisse
Hello, this is a simple patch to reduce a bit the noise in PR57324 (undefined behavior flagged by clang). I only handled some of the most obvious ones. Passes bootstrap+testsuite on x86_64-linux-gnu. 2013-05-24 Marc Glisse PR other/57324 * expmed.c (expand_smod_pow2): Use