https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65779
--- Comment #3 from Alan Modra <amodra at gmail dot com> --- Re comment #1, insn 36 is not removed, but moved later to bb3 (insn 363 364 41 3 (set (reg/v:SI 0 0 [orig:239 s2 ] [239]) (lshiftrt:SI (reg/v:SI 3 3 [orig:265 adler ] [265]) (const_int 16 [0x10]))) 270 {lshrsi3} (nil)) (debug_insn 41 363 42 3 (var_location:SI s2 (reg/v:SI 0 0 [orig:239 s2 ] [239])\ ) -1 (nil)) The trouble is that the original debug insn is not removed. We still have (debug_insn 37 35 39 2 (var_location:SI s2 (reg/v:SI 0 0 [orig:239 s2 ] [239]))\ ../../../../../../../../../rtems/c/src/lib/libbsp/powerpc/motorola_powerpc/boo\ tloader/../../../powerpc/shared/bootloader/zlib.c:2083 -1 (nil)) but this is not valid. s2 does *not* live in reg:SI 0 at this point.