[Bug debug/78685] -Og generates too many "<optimized out>"s (it should generate artificial uses for variables at end of scope to avoid this)
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 12 08:56:20 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78685
--- Comment #42 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to rguenther@suse.de from comment #41)
> > >such a resolution means that people will frequently end up using -O0
> > >for debugging, and O0 is far more expensive than it needs to be for
> > >viable debugging.
>
> In particular -O0 is also lacking debug features, the most prominent
> being lack of -fvar-tracking support and thus missing debug info
> in the prologue/epilogue.
And not just that, e.g. for VLAs also around the VLA declaration, or for vars
with register keyword everywhere, etc.
More information about the Gcc-bugs
mailing list