From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3947 invoked by alias); 27 Oct 2011 13:04:52 -0000 Received: (qmail 3933 invoked by uid 22791); 27 Oct 2011 13:04:50 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,TW_IB X-Spam-Check-By: sourceware.org Received: from c2beaomr08.btconnect.com (HELO mail.btconnect.com) (213.123.26.186) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 27 Oct 2011 13:04:25 +0000 Received: from host81-138-1-83.in-addr.btopenworld.com (EHLO thor.office) ([81.138.1.83]) by c2beaomr08.btconnect.com with ESMTP id EWB04959; Thu, 27 Oct 2011 14:04:19 +0100 (BST) Cc: David Miller , amodra@gmail.com, gcc-patches@gcc.gnu.org Message-Id: <0566B4D4-2767-4C9E-93CB-44BF0D190771@sandoe-acoustics.co.uk> From: Iain Sandoe To: Eric Botcazou In-Reply-To: <201110271233.22790.ebotcazou@adacore.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: Reload related segfaults Date: Thu, 27 Oct 2011 13:21:00 -0000 References: <20111027025956.GQ29439@bubble.grove.modra.org> <20111026.230711.1078076406757764801.davem@davemloft.net> <20111027.024029.1691741697599158961.davem@davemloft.net> <201110271233.22790.ebotcazou@adacore.com> X-Mirapoint-IP-Reputation: reputation=Fair-1, source=Queried, refid=tid=0001.0A0B0301.4EA956D2.00D3, actions=tag X-Junkmail-Premium-Raw: score=7/50, refid=2.7.2:2011.10.27.115714:17:7.944, ip=81.138.1.83, rules=__MULTIPLE_RCPTS_CC_X2, __HAS_MSGID, __SANE_MSGID, __MSGID_APPLEMAIL, __TO_MALFORMED_2, __CT, __CT_TEXT_PLAIN, __CTE, __MIME_VERSION, __MIME_VERSION_APPLEMAIL, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __SUBJ_ALPHA_END, __HAS_X_MAILER, __X_MAILER_APPLEMAIL, BODYTEXTP_SIZE_3000_LESS, BODY_SIZE_1200_1299, __MIME_TEXT_ONLY, RDNS_GENERIC_POOLED, BODY_SIZE_5000_LESS, RDNS_SUSP_GENERIC, __USER_AGENT_APPLEMAIL, RDNS_SUSP, BODY_SIZE_2000_LESS, BODY_SIZE_7000_LESS, NO_URI_FOUND, MULTIPLE_RCPTS X-Junkmail-Signature-Raw: score=unknown, refid=str=0001.0A0B0202.4EA956D4.00C7,ss=1,fgs=0, ip=0.0.0.0, so=2010-07-22 22:03:31, dmn=2009-09-10 00:05:08, mode=multiengine X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-10/txt/msg02464.txt.bz2 On 27 Oct 2011, at 11:33, Eric Botcazou wrote: >> The crash is in find_valid_class() called from push_reload(), via >> this >> code block around line 1184 of reload.c: >> >> enum reg_class in_out_class >> = find_valid_class (outmode, GET_MODE (SUBREG_REG (out)), >> subreg_regno_offset (REGNO (SUBREG_REG (out)), >> GET_MODE (SUBREG_REG (out)), >> SUBREG_BYTE (out), >> GET_MODE (out)), >> REGNO (SUBREG_REG (out))); >> >> 'out' is: >> >> (subreg:DI (reg/v:V4QI 50 %f18 [orig:314 s2hi4_ ] [314]) 0) >> >> so subreg_regno_offset() returns -1, and find_valid_class() isn't >> too happy >> about getting "-1" for it's 'n' argument. > > OK, Alan's case is the same-sized and yours is the paradoxical one. > Clearly we > shouldn't have tried to change anything for them. > > Tentative fix attached, it should restore the old behavior for the > cases where > everything was working fine before. I'm going to give it some > testing. > > > PR rtl-optimization/46603 > * reload.c (push_reload): In the out case, restore previous behavior > for subregs that don't have word mode. powerpc darwin9 is also affected - I stage3-bubbled the patch above and libjava built OK (full reg-strap is a long job). Iain