This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix unaligned access when predictive commoning (PR 71083)
> I think from Eric's comment in get_inner_ref it can be possible
> in Ada that the outer object is accidentally byte-aligned
> but the inner reference is not. In that case I think it is
> better to generate a BIT_FIELD_REF instead of a COMPONENT_REF.
The patch says get_bit_range instead... The comment therein means that
bitfields can be nested in Ada: you can have a bitfield in a record which is
itself a bitfield in another record.
> Eric do you agree? Are there any Ada test cases where the
> pcom optimization jumps in?
According to the comment, data-ref analysis punts on bit offsets so I'm not
sure how boff can be not byte-aligned.
--
Eric Botcazou