[PATCH] Don't create out-of-bounds BIT_FIELD_REFs

2013-11-25 Thread Tom de Vries
Jason, This patch prevents creating out-of-bounds BIT_FIELD_REFs in 3 locations. It fixes a SIGSEGV (triggered by gimple_fold_indirect_ref_1) in simplify_bitfield_ref. I've added an assert to detect the problematic BIT_FIELD_REF there. Bootstrapped and reg-tested on x86_64. OK for trunk? T

Re: [PATCH] Don't create out-of-bounds BIT_FIELD_REFs

2013-11-26 Thread Tom de Vries
[ Fix email address Marc ] On 26-11-13 08:57, Tom de Vries wrote: Jason, This patch prevents creating out-of-bounds BIT_FIELD_REFs in 3 locations. It fixes a SIGSEGV (triggered by gimple_fold_indirect_ref_1) in simplify_bitfield_ref. I've added an assert to detect the problematic BIT_FIELD_REF

Re: [PATCH] Don't create out-of-bounds BIT_FIELD_REFs

2013-11-26 Thread Richard Biener
On Tue, Nov 26, 2013 at 8:57 AM, Tom de Vries wrote: > Jason, > > This patch prevents creating out-of-bounds BIT_FIELD_REFs in 3 locations. > > It fixes a SIGSEGV (triggered by gimple_fold_indirect_ref_1) in > simplify_bitfield_ref. I've added an assert to detect the problematic > BIT_FIELD_REF th

Re: [PATCH] Don't create out-of-bounds BIT_FIELD_REFs

2013-11-26 Thread Tom de Vries
On 26-11-13 11:12, Richard Biener wrote: On Tue, Nov 26, 2013 at 8:57 AM, Tom de Vries wrote: Jason, This patch prevents creating out-of-bounds BIT_FIELD_REFs in 3 locations. It fixes a SIGSEGV (triggered by gimple_fold_indirect_ref_1) in simplify_bitfield_ref. I've added an assert to detect

Re: [PATCH] Don't create out-of-bounds BIT_FIELD_REFs

2013-11-26 Thread Jeff Law
On 11/26/13 14:10, Tom de Vries wrote: On 26-11-13 11:12, Richard Biener wrote: On Tue, Nov 26, 2013 at 8:57 AM, Tom de Vries wrote: Jason, This patch prevents creating out-of-bounds BIT_FIELD_REFs in 3 locations. It fixes a SIGSEGV (triggered by gimple_fold_indirect_ref_1) in simplify_bitfi

Re: [PATCH] Don't create out-of-bounds BIT_FIELD_REFs

2013-11-27 Thread Tom de Vries
On 27-11-13 07:20, Jeff Law wrote: On 11/26/13 14:10, Tom de Vries wrote: On 26-11-13 11:12, Richard Biener wrote: On Tue, Nov 26, 2013 at 8:57 AM, Tom de Vries wrote: Jason, This patch prevents creating out-of-bounds BIT_FIELD_REFs in 3 locations. It fixes a SIGSEGV (triggered by gimple_fo

Re: [PATCH] Don't create out-of-bounds BIT_FIELD_REFs

2013-11-28 Thread Richard Biener
On Thu, Nov 28, 2013 at 12:23 AM, Tom de Vries wrote: > On 27-11-13 07:20, Jeff Law wrote: >> >> On 11/26/13 14:10, Tom de Vries wrote: >>> >>> On 26-11-13 11:12, Richard Biener wrote: On Tue, Nov 26, 2013 at 8:57 AM, Tom de Vries wrote: > > Jason, > > This patch pr

Re: [PATCH] Don't create out-of-bounds BIT_FIELD_REFs

2013-11-28 Thread Eric Botcazou
> Ok if testing succeeds there but please leave out the checking bits. Yes, they (perhaps unsurprisingly) trigger in Ada, I'll investigate. -- Eric Botcazou

Re: [PATCH] Don't create out-of-bounds BIT_FIELD_REFs

2013-11-29 Thread Richard Biener
On Thu, Nov 28, 2013 at 4:39 PM, Eric Botcazou wrote: >> Ok if testing succeeds there but please leave out the checking bits. > > Yes, they (perhaps unsurprisingly) trigger in Ada, I'll investigate. PR59338, I have a fix in testing (restrict checking to non-aggregates). Richard. > -- > Eric Bot

Re: [PATCH] Don't create out-of-bounds BIT_FIELD_REFs

2013-11-29 Thread Eric Botcazou
> PR59338, I have a fix in testing (restrict checking to non-aggregates). This will be sufficient for Ada I think, this occurs only when downcasting because of the infamous VIEW_CONVERT_EXPRs used to implement it (yes, the ones which carry the TYPE_ALIGN_OK flag). -- Eric Botcazou

Re: [PATCH] Don't create out-of-bounds BIT_FIELD_REFs

2013-12-03 Thread Jakub Jelinek
On Thu, Nov 28, 2013 at 12:23:43AM +0100, Tom de Vries wrote: > Committed to trunk. > > Also ok for 4.8 branch? It's a 4.8/4.9 regression. Ok, but I guess you need to adjust your patch for 4.8 (tree_to_* and tree_fits_* to host_integerp/tree_low_cst), so please make sure you test it before commit

Re: [PATCH] Don't create out-of-bounds BIT_FIELD_REFs

2013-12-03 Thread Tom de Vries
On 03-12-13 13:49, Jakub Jelinek wrote: On Thu, Nov 28, 2013 at 12:23:43AM +0100, Tom de Vries wrote: Committed to trunk. Also ok for 4.8 branch? It's a 4.8/4.9 regression. Ok, but I guess you need to adjust your patch for 4.8 (tree_to_* and tree_fits_* to host_integerp/tree_low_cst), so plea