(record_label_references): Don't follow a null label reference chain.
authorJames Van Artsdalen <jrv@gnu.org>
Thu, 23 Sep 1993 06:07:19 +0000 (06:07 +0000)
committerJames Van Artsdalen <jrv@gnu.org>
Thu, 23 Sep 1993 06:07:19 +0000 (06:07 +0000)
From-SVN: r5429

gcc/reg-stack.c

index 33bd2689d76260b7ad7c9cbe56bb3286160543a4..3cf49dedf642680c0e27949c7e8dc3dd6acfb022 100644 (file)
@@ -406,7 +406,9 @@ record_label_references (insn, pat)
 
       /* Don't make a duplicate in the code_label's chain. */
 
-      for (ref = LABEL_REFS (label); ref != label; ref = LABEL_NEXTREF (ref))
+      for (ref = LABEL_REFS (label);
+          ref && ref != label;
+          ref = LABEL_NEXTREF (ref))
        if (CONTAINING_INSN (ref) == insn)
          return;