https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83941

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2018-01-19
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 43186
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43186&action=edit
broken patch

This is an attempt at solving this by pruning those DIEs that didn't receive
any further annotation.  The issue with this is that for example
gcc.dg/torture/pr67253.c still ICEs with this because location lists might
refer to the
pruned dies - in this particular case via DW_OP_GNU_parameter_ref.

I'm unsure if all such references can be adjusted to refer to the original
debug - at least code that uses get_ref_die_offset would need to be
replaced with get_ref_die_offset_label as is used elsewhere to allow
references to $early-debug-symbol + offset.  This replacement might also
come with a larger cost than simply keeping the forwarder.

So a better approach would compute whether the forwarder is used and only
then prune it.

Reply via email to