Re: [PATCH] Preserve GCC 5 behavior for PR71002

2016-05-11 Thread Richard Biener
On Tue, 10 May 2016, Jakub Jelinek wrote: > On Tue, May 10, 2016 at 10:18:59AM +0200, Richard Biener wrote: > > There are two options - not apply this folding if it doesn't preserve > > TBAA behavior (first patch) or preserve TBAA behavior by wrapping > > the base into a MEM_REF (which also requir

Re: [PATCH] Preserve GCC 5 behavior for PR71002

2016-05-10 Thread Jakub Jelinek
On Tue, May 10, 2016 at 10:18:59AM +0200, Richard Biener wrote: > There are two options - not apply this folding if it doesn't preserve > TBAA behavior (first patch) or preserve TBAA behavior by wrapping > the base into a MEM_REF (which also requires fixing > reference_alias_ptr_type, sth which we

[PATCH] Preserve GCC 5 behavior for PR71002

2016-05-10 Thread Richard Biener
The following patch fixes optimize_bit_field_compare / fold_truth_andor_1 to preserve TBAA behavior of the original access. This makes us preserve the implementation behavior of the C family languages using alias-set zero for all union accesses: /* Permit type-punning when accessing a union, p