Re: [wide-int] Handle zero-precision INTEGER_CSTs again

2014-05-06 Thread Richard Biener
On Tue, May 6, 2014 at 10:11 AM, Richard Sandiford wrote: > Richard Biener writes: >> On Mon, May 5, 2014 at 10:58 PM, Richard Sandiford >> wrote: >>> Richard Biener writes: On Mon, May 5, 2014 at 4:51 PM, Richard Sandiford wrote: > Richard Biener writes: >> On Mon, May 5, 2

Re: [wide-int] Handle zero-precision INTEGER_CSTs again

2014-05-06 Thread Richard Sandiford
Richard Biener writes: > On Mon, May 5, 2014 at 10:58 PM, Richard Sandiford > wrote: >> Richard Biener writes: >>> On Mon, May 5, 2014 at 4:51 PM, Richard Sandiford >>> wrote: Richard Biener writes: > On Mon, May 5, 2014 at 12:54 PM, Richard Sandiford > wrote: >> Richard Bien

Re: [wide-int] Handle zero-precision INTEGER_CSTs again

2014-05-06 Thread Richard Biener
On Mon, May 5, 2014 at 10:58 PM, Richard Sandiford wrote: > Richard Biener writes: >> On Mon, May 5, 2014 at 4:51 PM, Richard Sandiford >> wrote: >>> Richard Biener writes: On Mon, May 5, 2014 at 12:54 PM, Richard Sandiford wrote: > Richard Biener writes: >> On Fri, May 2, 2

Re: [wide-int] Handle zero-precision INTEGER_CSTs again

2014-05-05 Thread Richard Sandiford
Richard Biener writes: > On Mon, May 5, 2014 at 4:51 PM, Richard Sandiford > wrote: >> Richard Biener writes: >>> On Mon, May 5, 2014 at 12:54 PM, Richard Sandiford >>> wrote: Richard Biener writes: > On Fri, May 2, 2014 at 9:19 PM, Richard Sandiford > wrote: >> I'd hoped the

Re: [wide-int] Handle zero-precision INTEGER_CSTs again

2014-05-05 Thread Marek Polacek
On Mon, May 05, 2014 at 07:32:31PM +0200, Richard Biener wrote: > > void_zero_node is used for ubsan too, and survives into gimple. > > I did hit this in real tests, it wasn't just theoretical. > > Ugh - for what does it use that ... :/ It's used like this: t = fold_build3 (COND_EXPR, void_type_n

Re: [wide-int] Handle zero-precision INTEGER_CSTs again

2014-05-05 Thread Richard Biener
On Mon, May 5, 2014 at 4:51 PM, Richard Sandiford wrote: > Richard Biener writes: >> On Mon, May 5, 2014 at 12:54 PM, Richard Sandiford >> wrote: >>> Richard Biener writes: On Fri, May 2, 2014 at 9:19 PM, Richard Sandiford wrote: > I'd hoped the days of zero-precision INTEGER_CST

Re: [wide-int] Handle zero-precision INTEGER_CSTs again

2014-05-05 Thread Richard Sandiford
Richard Biener writes: > On Mon, May 5, 2014 at 12:54 PM, Richard Sandiford > wrote: >> Richard Biener writes: >>> On Fri, May 2, 2014 at 9:19 PM, Richard Sandiford >>> wrote: I'd hoped the days of zero-precision INTEGER_CSTs were behind us after Richard's patch to remove min amd max

Re: [wide-int] Handle zero-precision INTEGER_CSTs again

2014-05-05 Thread Richard Biener
On Mon, May 5, 2014 at 12:54 PM, Richard Sandiford wrote: > Richard Biener writes: >> On Fri, May 2, 2014 at 9:19 PM, Richard Sandiford >> wrote: >>> I'd hoped the days of zero-precision INTEGER_CSTs were behind us after >>> Richard's patch to remove min amd max values from zero-width bitfields,

Re: [wide-int] Handle zero-precision INTEGER_CSTs again

2014-05-05 Thread Richard Sandiford
Richard Biener writes: > On Fri, May 2, 2014 at 9:19 PM, Richard Sandiford > wrote: >> I'd hoped the days of zero-precision INTEGER_CSTs were behind us after >> Richard's patch to remove min amd max values from zero-width bitfields, >> but a boostrap-ubsan showed otherwise. One source is in: >>

Re: [wide-int] Handle zero-precision INTEGER_CSTs again

2014-05-05 Thread Richard Biener
On Fri, May 2, 2014 at 9:19 PM, Richard Sandiford wrote: > I'd hoped the days of zero-precision INTEGER_CSTs were behind us after > Richard's patch to remove min amd max values from zero-width bitfields, > but a boostrap-ubsan showed otherwise. One source is in: > > null_pointer_node = build_in

Re: [wide-int] Handle zero-precision INTEGER_CSTs again

2014-05-04 Thread Richard Sandiford
Kenneth Zadeck writes: > Then with a fixed comment, this patch is fine. OK, here's what I committed. Richard Index: gcc/wide-int.cc === --- gcc/wide-int.cc 2014-05-03 07:59:36.274750108 +0100 +++ gcc/wide-int.cc 2014-05-04

Re: [wide-int] Handle zero-precision INTEGER_CSTs again

2014-05-03 Thread Kenneth Zadeck
Then with a fixed comment, this patch is fine. kenny On 05/03/2014 02:59 PM, Richard Sandiford wrote: Kenneth Zadeck writes: The doc at wide-int.h:136 needs work.The doc currently says that the precision and length are always greater than 0. This is now not correct. It also says tha

Re: [wide-int] Handle zero-precision INTEGER_CSTs again

2014-05-03 Thread Richard Sandiford
Kenneth Zadeck writes: > The doc at wide-int.h:136 needs work.The doc currently says that the > precision and length are always greater than 0. This is now not > correct. It also says that the bits above the precision are defined > to be the sign extension if the precision does not co

Re: [wide-int] Handle zero-precision INTEGER_CSTs again

2014-05-03 Thread Kenneth Zadeck
The doc at wide-int.h:136 needs work.The doc currently says that the precision and length are always greater than 0. This is now not correct. It also says that the bits above the precision are defined to be the sign extension if the precision does not cover that block. I do not know

[wide-int] Handle zero-precision INTEGER_CSTs again

2014-05-02 Thread Richard Sandiford
I'd hoped the days of zero-precision INTEGER_CSTs were behind us after Richard's patch to remove min amd max values from zero-width bitfields, but a boostrap-ubsan showed otherwise. One source is in: null_pointer_node = build_int_cst (build_pointer_type (void_type_node), 0); if no_target, sinc