https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85697
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2018-05-09 00:00:00 |2021-8-10
Severity|normal |enhancement
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note the testcase needs a slight update to it:
__attribute__((noinline, noipa)) void UseA (A& a) { a.a=1; }
Note you need the noipa because GCC figures out that only writes to a.a and
later on only accesses a.a so it deletes the other writes :).
Turning SLP on at -O2/-Os would be something to look into.