https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120210
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2026-02-16
Priority|P3 |P2
Ever confirmed|0 |1
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. One issue is that early uninit doesn't see that size() eventually
is detected as const, so
/* Const function do not read their arguments. */
if (gimple_call_flags (stmt) & ECF_CONST)
return;
doesn't trigger. It isn't detected as const at -O0 anyway since of course
local/IPA-pure-const does not run. For static analysis purposes at -O0
we might want to run full IPA pure-const, but of course disregard it for
optimization.