* config/sh/sh.c (split_branches): Check the result of
authorkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 27 Aug 2009 22:56:41 +0000 (22:56 +0000)
committerkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 27 Aug 2009 22:56:41 +0000 (22:56 +0000)
next_active_insn.

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

gcc/ChangeLog
gcc/config/sh/sh.c

index 8b0a6af..de1e1c5 100644 (file)
@@ -1,3 +1,8 @@
+2009-08-27  Kaz Kojima  <kkojima@gcc.gnu.org>
+
+       * config/sh/sh.c (split_branches): Check the result of
+       next_active_insn.
+
 2009-08-27  Steve Ellcey  <sje@cup.hp.com>
 
        * config/ia64/hpux.h (LIB_SPEC): Add -lrt for when
index 71933d6..ed8a698 100644 (file)
@@ -5841,9 +5841,10 @@ split_branches (rtx first)
 
            next = next_active_insn (insn);
 
-           if ((JUMP_P (next)
-                || ((next = next_active_insn (next))
-                    && JUMP_P (next)))
+           if (next
+               && (JUMP_P (next)
+                   || ((next = next_active_insn (next))
+                       && JUMP_P (next)))
                && GET_CODE (PATTERN (next)) == SET
                && recog_memoized (next) == CODE_FOR_jump_compact
                && ((INSN_ADDRESSES