aboutsummaryrefslogtreecommitdiff
path: root/gcc/global.c
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@redhat.com>2000-12-05 19:12:20 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2000-12-05 19:12:20 +0000
commit06a3a6db4927eae52a4d3641a0ac551f13303f40 (patch)
tree1cc6d53b64fe4875095c73cca99ebc7d2f154ef1 /gcc/global.c
parent9c101f4a0fa7eedad44f57e6c32c42a2141b369e (diff)
downloadgcc-06a3a6db4927eae52a4d3641a0ac551f13303f40.zip
gcc-06a3a6db4927eae52a4d3641a0ac551f13303f40.tar.gz
gcc-06a3a6db4927eae52a4d3641a0ac551f13303f40.tar.bz2
global.c (global_conflicts): Allow for a REG_UNUSED note with a different mode to the REG set in the insn.
* global.c (global_conflicts): Allow for a REG_UNUSED note with a different mode to the REG set in the insn. * gcc.c-torture/execute/20001203-2.c: New testcase. From-SVN: r38046
Diffstat (limited to 'gcc/global.c')
-rw-r--r--gcc/global.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/global.c b/gcc/global.c
index 54d18c8..8aa172a 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))