diff options
Diffstat (limited to 'gcc/global.c')
-rw-r--r-- | gcc/global.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/global.c b/gcc/global.c index 54d18c80d23..8aa172a5e36 100644 --- a/gcc/global.c +++ b/gcc/global.c @@ -804,10 +804,13 @@ global_conflicts () /* Mark any registers set in INSN and then never used. */ - while (n_regs_set > 0) - if (find_regno_note (insn, REG_UNUSED, - REGNO (regs_set[--n_regs_set]))) - mark_reg_death (regs_set[n_regs_set]); + while (n_regs_set-- > 0) + { + rtx note = find_regno_note (insn, REG_UNUSED, + REGNO (regs_set[n_regs_set])); + if (note) + mark_reg_death (XEXP (note, 0)); + } } if (insn == BLOCK_END (b)) |