https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126650
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
So it's
aff_tree off1, off2;
poly_widest_int size1, size2;
get_inner_reference_aff (DR_REF (a), &off1, &size1);
get_inner_reference_aff (DR_REF (b), &off2, &size2);
aff_combination_scale (&off1, -1);
aff_combination_add (&off2, &off1);
if (aff_comb_cannot_overlap_p (&off2, size1, size2))
return false;
that triggers for f.e[3] vs. f.bf.c.
(gdb) p debug_aff(&off1)
{
type = sizetype
offset = 3
elements = {
[0] = &f * 1
}
}
$17 = void
(gdb) p debug_aff(&off2)
{
type = sizetype
offset = 2
elements = {
[0] = &f * 1
}
}
the issue is that we have bitpos == 18 and bitsize == 7 and we do
aff_combination_const (&tmp, sizetype, bits_to_bytes_round_down (bitpos));
aff_combination_add (addr, &tmp);
*size = bits_to_bytes_round_up (bitsize);
so we round down 18 to a 2 byte offset and bitsize up to 1 byte. But
we have to round up bitsize + bitpos - rounded-down-bitpos.