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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
I will have a look.

(gdb) p debug_dwarf_die (die)
DIE    0: DW_TAG_label (0x7ffff68dc410)
  abbrev id: 0 offset: 0 mark: 0
(gdb) p attr_kind
$2 = DW_AT_abstract_origin

and in gen_label_die we do

  tree origin = decl_ultimate_origin (decl);
  dw_die_ref lbl_die = lookup_decl_die (decl);
  rtx insn;
  char label[MAX_ARTIFICIAL_LABEL_BYTES];

  if (!lbl_die)
    { 
      lbl_die = new_die (DW_TAG_label, context_die, decl);
      equate_decl_number_to_die (decl, lbl_die);

      if (origin != NULL)
        add_abstract_origin_attribute (lbl_die, origin);

but origin == decl here.

(gdb) p decl->decl_common.abstract_origin 
$6 = <label_decl 0x7ffff7fc8e00 no_change>

that's read this way from the LTO data.  A workaround right in dwarf2out
is possible, but I'll see if this self-reference makes sense (and where
it comes from).

Reply via email to