On Mon, 5 Sep 2011, Eric Botcazou wrote: > > This avoids setting the TREE_OVERFLOW bit on DECL_FIELD_OFFSET for > > the shifted bounds field. > > > > If DECL_FIELD_OFFSET of array-field is always a constant we could > > as well use > > > > DECL_FIELD_OFFSET (bounds_field) > > = size_int (-int_byte_position (array_field)); > > > > also I notice that DECL_OFFSET_ALIGN is now bogus for bounds_field. > > Yes, the offsets in the template record are fixed. > > > DECL_FIELD_OFFSET no longer has the desired zero bits. Shouldn't we > > instead set DECL_FIELD_OFFSET to -DECL_OFFSET_ALIGN and adjust > > DECL_FIELD_BIT_OFFSET accordingly? > > > > Well, with the above questions and suggestions I'd rather leave it > > to you deciding whether you like the below hack or want to rework > > the function a bit. > > I guess that we have 3 solutions: > - keep the negative offset hack and patch up, > - make DECL_FIELD_OFFSET use ssizetype instead of sizetype, > - remove the negative offset hack and devise a replacement mechanism. > > We previously discussed 2 internally and agreed that it would be kind of an > earthquake (feel free to differ though :-) So it's probably about time to > bite the bullet and tackle 3 seriously...
Heh, well - more power to you (I agree about 2 ...). The other main related issue I run into is signed array domains (see PR50294, similar issues arise with current sign-extending sizetypes and unsigned array domains). Any hints on that? I can certainly "patch up" this one as well to some extent in layout_type ... Thanks, Richard.