]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
regclass.c (reg_scan_mark_refs): Return immediately if passed a NULL_RTX as an argument.
authorJeff Law <law@gcc.gnu.org>
Fri, 2 Oct 1998 01:34:34 +0000 (19:34 -0600)
committerJeff Law <law@gcc.gnu.org>
Fri, 2 Oct 1998 01:34:34 +0000 (19:34 -0600)
8
        * regclass.c (reg_scan_mark_refs): Return immediately if passed a
        NULL_RTX as an argument.

From-SVN: r22741

gcc/regclass.c

index ac17dfe3ef10050cab0f4c5e5ca0df5a765ae7ac..793c9ac050ee78540ce89e96967fbdea9adb95dd 100644 (file)
@@ -1991,10 +1991,18 @@ reg_scan_mark_refs (x, insn, note_flag, min_regno)
      int note_flag;
      int min_regno;
 {
-  register enum rtx_code code = GET_CODE (x);
+  register enum rtx_code code;
   register rtx dest;
   register rtx note;
 
+  /* This can happen when scanning insns referenced by certain notes.
+
+     It is unclear if we should be scanning such insns; until someone can
+     say for sure this seems like the safest fix.  */
+  if (x == NULL_RTX)
+    return;
+
+  code = GET_CODE (x);
   switch (code)
     {
     case CONST_INT: