https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128617
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
So the "issue" is that the link-time -g "overrides" the -g0 choice for a.C and
"late LTO debug" is simply broken.
Don't do this then I guess. I don't see an easy way to properly preserve -g0
which is what I'd say would be the actual fix. Possibly setting DECL_IGNORED_P
on all decls coming from the -g0 TU during LTO streaming might help.