diff options
author | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-12-05 19:12:20 +0000 |
---|---|---|
committer | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-12-05 19:12:20 +0000 |
commit | 34c8a8c19df0515223face51ee3a516843b6f2a1 (patch) | |
tree | 1cc6d53b64fe4875095c73cca99ebc7d2f154ef1 /gcc/global.c | |
parent | d107fb5f77168b4ccb43c1e8268ea044cb9067f9 (diff) | |
download | gcc-34c8a8c19df0515223face51ee3a516843b6f2a1.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38046 138bc75d-0d04-0410-961f-82ee72b054a4
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)) |