From 06a3a6db4927eae52a4d3641a0ac551f13303f40 Mon Sep 17 00:00:00 2001 From: Geoffrey Keating Date: Tue, 5 Dec 2000 19:12:20 +0000 Subject: 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 --- gcc/global.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'gcc/global.c') 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)) -- cgit v1.1