aboutsummaryrefslogtreecommitdiff
path: root/gcc/unroll.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2002-01-12 18:02:43 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2002-01-12 17:02:43 +0000
commit9d5608608ce71fbfe4e0fcc247ec166c47ff3f53 (patch)
tree61f241d1c36fab939b7f1d377960136cb3f3fff7 /gcc/unroll.c
parenta426c92e8f26a584a5fe782cca0f8524e10eab46 (diff)
downloadgcc-9d5608608ce71fbfe4e0fcc247ec166c47ff3f53.zip
gcc-9d5608608ce71fbfe4e0fcc247ec166c47ff3f53.tar.gz
gcc-9d5608608ce71fbfe4e0fcc247ec166c47ff3f53.tar.bz2
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
Diffstat (limited to 'gcc/unroll.c')
-rw-r--r--gcc/unroll.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/unroll.c b/gcc/unroll.c
index df02b7c..aa1b2c6 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;
}
}