Re: [PATCH] middle-end/95493 - bogus MEM_ATTRs from variable ARRAY_REFs

2020-06-03 Thread Richard Biener
On Wed, 3 Jun 2020, Richard Biener wrote: > > The following patch avoids keeping the inherited MEM_ATTRs when > set_mem_attributes_minus_bitpos is called with a variable ARRAY_REF. > The inherited ones may not reflect the correct offset. > > We try to preserve the MEM_EXPR from the base object e

[PATCH] middle-end/95493 - bogus MEM_ATTRs from variable ARRAY_REFs

2020-06-03 Thread Richard Biener
The following patch avoids keeping the inherited MEM_ATTRs when set_mem_attributes_minus_bitpos is called with a variable ARRAY_REF. The inherited ones may not reflect the correct offset. We try to preserve the MEM_EXPR from the base object expansion but we have to make sure to also preserve the