From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8586 invoked by alias); 19 Apr 2007 23:05:15 -0000 Received: (qmail 8489 invoked by uid 48); 19 Apr 2007 23:05:05 -0000 Date: Thu, 19 Apr 2007 23:05:00 -0000 Message-ID: <20070419230505.8488.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/31480] [4.1/4.2 Regression] ICE with -O -fomit-frame-pointer on SH In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "kkojima at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-04/txt/msg01489.txt.bz2 ------- Comment #1 from kkojima at gcc dot gnu dot org 2007-04-20 00:05 ------- I've confirmed that the testcase doesn't fail with 3.4 compiler and fails with 4.0, 4.1 and 4.2. Although it doesn't fail with the current trunk compiler, it might be simply latent. The segfault occurs in insn_current_length when evaluating GET_CODE for a null rtx. Now I'm testing the patch below. --- ORIG/trunk/gcc/config/sh/sh.md 2007-03-29 08:44:33.000000000 +0900 +++ LOCAL/trunk/gcc/config/sh/sh.md 2007-04-19 11:02:06.000000000 +0900 @@ -420,10 +420,12 @@ (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)) -- kkojima at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kkojima at gcc dot gnu dot | |org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Known to fail| |4.0.4 4.1.2 4.2.0 Known to work| |3.4.6 Last reconfirmed|0000-00-00 00:00:00 |2007-04-20 00:05:05 date| | Summary|internal compiler error: |[4.1/4.2 Regression] ICE |Segmentation fault |with -O -fomit-frame-pointer | |on SH http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31480