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

--- Comment #3 from Martin Jambor <jamborm at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #2)

> It seems to me this is a task for SRA (again...) which should be more
> forgiving to select stmts requiring address-taking of locals but only
> when they are not rewritten plus analyzing memcpy, memset (and other
> select builtins) as to their effect.

With https://gcc.gnu.org/pipermail/gcc-patches/2023-November/636836.html

SRA is more forgiving to address-taken candidates like this but indeed
it also needs to understand memcpy and similar builtins, which it does
not.  Representing it in GIMPLE might almost work, though we probably
need to handle that case in build_ref_for_offset to create MEM_REFs
with the appropriate alias access type.

Reply via email to