From 9d5608608ce71fbfe4e0fcc247ec166c47ff3f53 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sat, 12 Jan 2002 18:02:43 +0100 Subject: [PATCH] unroll.c (final_reg_note_copy): Avoid crash on REG_LABEL note referencing outside. * unroll.c (final_reg_note_copy): Avoid crash on REG_LABEL note referencing outside. From-SVN: r48803 --- gcc/ChangeLog | 5 +++++ gcc/unroll.c | 13 +++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c1ff26bf012..22ee1b1df95 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Sat Jan 12 17:38:11 CET 2002 Jan Hubicka + + * unroll.c (final_reg_note_copy): Avoid crash on REG_LABEL note + referencing outside. + Sat Jan 12 08:54:51 2002 Richard Kenner * diagnostic.c (warn_deprecated_use): Rework to lower indentation. diff --git a/gcc/unroll.c b/gcc/unroll.c index df02b7c8cbb..aa1b2c68448 100644 --- a/gcc/unroll.c +++ b/gcc/unroll.c @@ -1741,11 +1741,16 @@ final_reg_note_copy (notesp, map) { rtx insn = map->insn_map[INSN_UID (XEXP (note, 0))]; - /* If we failed to remap the note, something is awry. */ + /* If we failed to remap the note, something is awry. + Allow REG_LABEL as it may reference label outside + the unrolled loop. */ if (!insn) - abort (); - - XEXP (note, 0) = insn; + { + if (REG_NOTE_KIND (note) != REG_LABEL) + abort (); + } + else + XEXP (note, 0) = insn; } } -- 2.30.2