]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/31480 (ICE with -O -fomit-frame-pointer on SH)
authorKaz Kojima <kkojima@gcc.gnu.org>
Sun, 20 May 2007 23:55:48 +0000 (23:55 +0000)
committerKaz Kojima <kkojima@gcc.gnu.org>
Sun, 20 May 2007 23:55:48 +0000 (23:55 +0000)
PR target/31480
Backport from mainline.
* config/sh/sh.md (length): Check if prev_nonnote_insn (insn)
is null.

From-SVN: r124884

gcc/ChangeLog
gcc/config/sh/sh.md

index 61c3490e00fbf3a01869424da09c204fdc73b3fe..ef1d1d15187a530362242666ed6135bcdaf1889c 100644 (file)
@@ -1,3 +1,10 @@
+2007-05-20  Kaz Kojima  <kkojima@gcc.gnu.org>
+
+       PR target/31480
+       Backport from mainline.
+       * config/sh/sh.md (length): Check if prev_nonnote_insn (insn)
+       is null.
+
 2007-05-20  Kaz Kojima  <kkojima@gcc.gnu.org>
 
        PR target/31022
index 2d3f2eb8ccc59849b14aaf13b617677dc9ed9a28..13ed3845cbe07717a0497f92341f5a64e8e0bd6b 100644 (file)
         (eq_attr "type" "jump")
         (cond [(eq_attr "med_branch_p" "yes")
                (const_int 2)
-               (and (eq (symbol_ref "GET_CODE (prev_nonnote_insn (insn))")
-                         (symbol_ref "INSN"))
-                     (eq (symbol_ref "INSN_CODE (prev_nonnote_insn (insn))")
-                         (symbol_ref "code_for_indirect_jump_scratch")))
+               (and (ne (symbol_ref "prev_nonnote_insn (insn)")
+                        (const_int 0))
+                    (and (eq (symbol_ref "GET_CODE (prev_nonnote_insn (insn))")
+                             (symbol_ref "INSN"))
+                         (eq (symbol_ref "INSN_CODE (prev_nonnote_insn (insn))")
+                             (symbol_ref "code_for_indirect_jump_scratch"))))
                 (cond [(eq_attr "braf_branch_p" "yes")
                        (const_int 6)
                        (eq (symbol_ref "flag_pic") (const_int 0))