re PR target/31480 (ICE with -O -fomit-frame-pointer on SH)
authorKaz Kojima <kkojima@gcc.gnu.org>
Sun, 22 Apr 2007 00:18:02 +0000 (00:18 +0000)
committerKaz Kojima <kkojima@gcc.gnu.org>
Sun, 22 Apr 2007 00:18:02 +0000 (00:18 +0000)
PR target/31480
* config/sh/sh.md (length): Check if prev_nonnote_insn (insn)
is null.

From-SVN: r124031

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

index 19e47fc6aa0594520b53c114cd3e9f85c2170fbf..036f903e1c9dc0c27ff60fca5a25a4fade4268a2 100644 (file)
@@ -1,3 +1,9 @@
+2007-04-21  Kaz Kojima  <kkojima@gcc.gnu.org>
+
+       PR target/31480
+       * config/sh/sh.md (length): Check if prev_nonnote_insn (insn)
+       is null.
+
 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
 
        * timevar.c (timevar_print): Change reference of --disable-checking to
index fe99638f99b5a43506bea84e81154ac6b453b4de..8d645052d8933f683a1d347edcc57bd9d2d9daaa 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))