diff options
author | Jakub Jelinek <jakub@redhat.com> | 2001-12-20 09:23:42 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2001-12-20 09:23:42 +0100 |
commit | 2a3b43b609ca4f3850226eecb5fec29f1ab80d35 (patch) | |
tree | 7c7f9aed03e1e7a83662e28c10919afc41c55fc8 /gcc/combine.c | |
parent | c12b6f2a0716f77d3bc482b022698c14e7b02fce (diff) | |
download | gcc-2a3b43b609ca4f3850226eecb5fec29f1ab80d35.zip gcc-2a3b43b609ca4f3850226eecb5fec29f1ab80d35.tar.gz gcc-2a3b43b609ca4f3850226eecb5fec29f1ab80d35.tar.bz2 |
combine.c (distribute_notes): Avoid adding REG_LABEL notes to JUMP_INSNs with JUMP_LABEL.
* combine.c (distribute_notes): Avoid adding REG_LABEL notes
to JUMP_INSNs with JUMP_LABEL.
* gcc.c-torture/execute/20011219-1.c: New test.
From-SVN: r48198
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 82e86b2..a0b08ec 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -12129,6 +12129,25 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1) else place = i2; } + + /* Don't attach REG_LABEL note to a JUMP_INSN which has + JUMP_LABEL already. Instead, decrement LABEL_NUSES. */ + if (place && GET_CODE (place) == JUMP_INSN && JUMP_LABEL (place)) + { + if (JUMP_LABEL (place) != XEXP (note, 0)) + abort (); + if (GET_CODE (JUMP_LABEL (place)) == CODE_LABEL) + LABEL_NUSES (JUMP_LABEL (place))--; + place = 0; + } + if (place2 && GET_CODE (place2) == JUMP_INSN && JUMP_LABEL (place2)) + { + if (JUMP_LABEL (place2) != XEXP (note, 0)) + abort (); + if (GET_CODE (JUMP_LABEL (place2)) == CODE_LABEL) + LABEL_NUSES (JUMP_LABEL (place2))--; + place2 = 0; + } break; case REG_NONNEG: |