From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28422 invoked by alias); 15 Mar 2007 13:17:08 -0000 Received: (qmail 28384 invoked by uid 48); 15 Mar 2007 13:16:57 -0000 Date: Thu, 15 Mar 2007 13:17:00 -0000 Message-ID: <20070315131657.28383.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/31022] [4.1/4.2/4.3 Regression] [SH4] internal compiler error with inline 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-03/txt/msg01386.txt.bz2 ------- Comment #1 from kkojima at gcc dot gnu dot org 2007-03-15 13:16 ------- I've confirmed that the trunk and 4.2 compilers ice on the testcase and 4.0 doesn't fail. So this is a 4.1/4.2/4.3 regression. In the problematic case, sh_adjust_cost takes SET_DEST (PATTERN (dep_insn)) where dep_insn is (insn:HI 8 7 47 2 (parallel [ (set (reg:SF 2 r2 [orig:160 num ] [160]) (mem/c/i:SF (reg/f:SI 1 r1 [162]) [2 f+0 S4 A32])) (use (reg/v:PSI 151 )) (clobber (scratch:SI)) ]) 202 {movsf_ie} (nil) (nil)) and calls reg_overlap_mentioned_p with it as the first argument. We can't use SET_DEST for parallel patterns directly. Now I'm testing the patch below on the trunk. --- ORIG/trunk/gcc/config/sh/sh.c 2007-03-10 16:04:12.000000000 +0900 +++ LOCAL/trunk/gcc/config/sh/sh.c 2007-03-15 08:43:32.000000000 +0900 @@ -8966,7 +8966,7 @@ sh_adjust_cost (rtx insn, rtx link ATTRI by 1 cycle. */ if (get_attr_type (insn) == TYPE_DYN_SHIFT && get_attr_any_int_load (dep_insn) == ANY_INT_LOAD_YES - && reg_overlap_mentioned_p (SET_DEST (PATTERN (dep_insn)), + && reg_overlap_mentioned_p (SET_DEST (dep_set), XEXP (SET_SRC (single_set (insn)), 1))) cost++; For the 4.1-branch, the patch will be --- ORIG/gcc-4_1-branch/gcc/config/sh/sh.c 2006-10-23 20:35:45.000000000 +0900 +++ LOCAL/gcc-4_1-branch/gcc/config/sh/sh.c 2007-03-15 09:06:26.000000000 +0900 @@ -8477,7 +8477,7 @@ sh_adjust_cost (rtx insn, rtx link ATTRI else if (TARGET_SH4 && get_attr_type (insn) == TYPE_DYN_SHIFT && get_attr_any_int_load (dep_insn) == ANY_INT_LOAD_YES - && reg_overlap_mentioned_p (SET_DEST (PATTERN (dep_insn)), + && reg_overlap_mentioned_p (SET_DEST (single_set (dep_insn)), XEXP (SET_SRC (single_set (insn)), 1))) cost++; -- 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.1.2 4.2.0 4.3.0 Known to work| |4.0.4 Last reconfirmed|0000-00-00 00:00:00 |2007-03-15 13:16:57 date| | Summary|[SH4] internal compiler |[4.1/4.2/4.3 Regression] |error with inline |[SH4] internal compiler | |error with inline http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31022