https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111807

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jamborm at gcc dot gnu.org

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think the issue is we are doing propagate_subaccesses_from_rhs with the
LHS l_4827[5] and the RHS access l_4827[9].f2.  We then end up with
build_ref_for_model calling build_reconstructed_reference but that will
simply re-construct the exact same reference with the same offset as the
model rather than the new desired offset ..

Possibly the mistake is setting ->grp_same_access_path here?

I wonder how this ever works for offset < model->offset and thus if the
fix is actually

-         && offset <= model->offset
+         && offset == model->offset

(gdb) p base
$59 = <var_decl 0x7ffff6d4ecf0 l_4827>
(gdb) p debug_generic_expr (model->expr)
BIT_FIELD_REF <l_4827[9], 8, 0>
(gdb) p model->offset
$61 = 288
(gdb) p offset
$62 = 160

that fixes the issue.

Reply via email to