(fixup_var_refs_insns): Don't call delete_insn if not -O.
authorRichard Stallman <rms@gnu.org>
Mon, 26 Oct 1992 05:53:07 +0000 (05:53 +0000)
committerRichard Stallman <rms@gnu.org>
Mon, 26 Oct 1992 05:53:07 +0000 (05:53 +0000)
Make a NOTE_INSN_DELETED instead.

From-SVN: r2609

gcc/function.c

index 1ff2778f61d7a48b0540a02b102a37d4ee87fa99..9f02b0dba90a09d2739aad4b955d8125ba8e624d 100644 (file)
@@ -1014,7 +1014,11 @@ fixup_var_refs_insns (var, promoted_mode, unsignedp, insn, toplevel)
              && SET_DEST (PATTERN (insn)) == var
              && rtx_equal_p (SET_SRC (PATTERN (insn)), var))
            {
-             next = delete_insn (insn);
+             /* In unoptimized compilation, we shouldn't call delete_insn
+                except in jump.c doing warnings.  */
+             PUT_CODE (insn, NOTE);
+             NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED;
+             NOTE_SOURCE_FILE (insn) = 0;
              if (insn == last_parm_insn)
                last_parm_insn = PREV_INSN (next);
            }