Fix segfault on degenerate bitfield case
Richard Sandiford
rdsandiford@googlemail.com
Sat Dec 1 09:30:00 GMT 2012
Eric Botcazou <ebotcazou@adacore.com> writes:
> This is a segfault on a degenerate bitfield case introduced by the rewrite of
> the bitfield machinery. In Ada, we have bitfields of size zero and we ask the
> middle-end to generate accesses to them. This doesn't work anymore because
> get_best_mode now returns VOIDmode instead of QImode in this case, which
> wreaks havoc later.
>
> The patchlet just restores the previous behaviour. It also makes the comment
> describing the computation of bitregion_end_ more explicit, as the original
> formulation is a bit terse on second reading, even for the reviewer. :-)
>
> Bootstrapped/regtested on x86-64/Linux, applied on the mainline as obvious.
Thanks!
Richard
More information about the Gcc-patches
mailing list