From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5424 invoked by alias); 28 Jul 2014 05:48:15 -0000 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 Received: (qmail 5277 invoked by uid 48); 28 Jul 2014 05:48:03 -0000 From: "kkojima at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/61844] ICE when building libgcc for sh64 cross-compiler Date: Mon, 28 Jul 2014 05:48:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kkojima at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-07/txt/msg01797.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61844 --- Comment #9 from Kazumoto Kojima --- The testcase in #7 can be compiled successfully when -mindexed-addressing is added. It looks that base+index reg addressing mode is disabled for shmedia32 and shcompact as default and it makes ira unhappy. We used to return NO_REGS for INDEX_REG_CLASS when -mindexed-addressing is disabled and it could suppress the use of reg+index addressing in the older compilers. It seems that now this isn't the right way to disable that addressing. With --- /svn/trunk/gcc/config/sh/sh.h 2014-05-14 10:20:06.526008871 +0900 +++ gcc/config/sh/sh.h 2014-07-28 14:16:51.358771570 +0900 @@ -1723,8 +1723,7 @@ struct sh_args { #define INDEX_REGISTER_RTX_P(X) MAYBE_INDEX_REGISTER_RTX_P(X, false) #endif -#define ALLOW_INDEXED_ADDRESS \ - ((!TARGET_SHMEDIA32 && !TARGET_SHCOMPACT) || TARGET_ALLOW_INDEXED_ADDRESS) +#define ALLOW_INDEXED_ADDRESS 1 /* A C compound statement that attempts to replace X, which is an address that needs reloading, with a valid memory address for an operand of my c-only sh64-elf build is completed without errors. Although I don't think the patch does the right thing, it'll prove that ALLOW_INDEXED_ADDRESS causes problems.