https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121355
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot
gnu.org
Last reconfirmed| |2025-08-30
Ever confirmed|0 |1
Status|UNCONFIRMED |ASSIGNED
Severity|normal |enhancement
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. The problem is a missed optimization at the gimple level:
_9 = x_2(D) + 16;
_10 = &MEM[(const struct array *)x_2(D) + 8B]._M_elems;
_13 = _9 - _10;
That should be 8 (bytes) if I do my math correctly (as _M_elems is at offset
0).
I will look into this in a few days I think.