[Bug debug/90900] [8/9/10 Regression] ICE in copy_rtx, at rtl.c:376

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jun 18 08:06:00 GMT 2019


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

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

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
#1  0x000000000110c18b in copy_rtx (orig=0x7ffff6c51440)
    at ../../src/trunk/gcc/rtl.c:376
376             gcc_unreachable ();
(gdb) p debug_rtx (orig)
(note/s 5 0 0 ("lab") NOTE_INSN_DELETED_LABEL 2)

this is expanding debug info for a LABEL_DECL, somehow DECL_RTL is the above
rather than unset which

      op0 = DECL_RTL_IF_SET (exp);

      /* This decl was probably optimized away.  */
      if (!op0)
        {
          if (!VAR_P (exp)
              || DECL_EXTERNAL (exp)
              || !TREE_STATIC (exp)
              || !DECL_NAME (exp)
              || DECL_HARD_REGISTER (exp)
              || DECL_IN_CONSTANT_POOL (exp)
              || mode == VOIDmode)
            return NULL;

assumes.  Not sure if this is "valid RTL" or if the above code should also
check for INSN_DELETED* notes?  At least delete_insn has code to
rewrite existing label insns into those notes.

Testing a patch.


More information about the Gcc-bugs mailing list