OSDN Git Service

* unroll.c (final_reg_note_copy): Avoid crash on REG_LABEL note
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 12 Jan 2002 17:02:43 +0000 (17:02 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 12 Jan 2002 17:02:43 +0000 (17:02 +0000)
referencing outside.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48803 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/unroll.c

index c1ff26b..22ee1b1 100644 (file)
@@ -1,3 +1,8 @@
+Sat Jan 12 17:38:11 CET 2002  Jan Hubicka  <jh@suse.cz>
+
+       * unroll.c (final_reg_note_copy): Avoid crash on REG_LABEL note
+       referencing outside.
+
 Sat Jan 12 08:54:51 2002  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
        * diagnostic.c (warn_deprecated_use): Rework to lower indentation.
index df02b7c..aa1b2c6 100644 (file)
@@ -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;
            }
        }