On Wed, 30 Nov 2016, Richard Biener wrote: > but that probably shouldn't apply to array types. The idea is that > objects of the same type cannot overlap. Maybe Joseph can clarify whether > and array object of known size really constitutes an object in that sense.
This is one of the ambiguous cases about which objects are relevant for type-based aliasing rules. I think it's best not to optimize this (that is, to treat the objects as being the individual array elements, so the arrays can overlap by an exact multiple of the element size - meaning the ultimate element size in the case of multidimensional arrays, so e.g. two int[4][5] arrays could be offset by one int from each other). -- Joseph S. Myers jos...@codesourcery.com