https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124031
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2026-02-09
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. The issue is that gen_type_die_for_member doesn't generate a DIE
for the FIELD_DECL and force_die doesn't know how to force a FIELD_DECL.
I guess debug info for imported FIELD_DECLs have to be disabled for
-femit-struct-debug-baseonly to avoid this inconsistency.
Looks it's likely unmaintained code as well, and complicated code. Instead
of pruning DWARF at the end it tries to gate generation. That's always prone
to "fail".
Teaching force_decl_die of how to generate a DIE for FIELD_DECLs is _not_
the way to go IMO.