From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15547 invoked by alias); 19 Nov 2012 19:00:35 -0000 Received: (qmail 14628 invoked by uid 48); 19 Nov 2012 19:00:02 -0000 From: "rsandifo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/55359] [4.8 Regression] ICE in simplify_subreg accessing an unaligned subvector Date: Mon, 19 Nov 2012 19:00:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rsandifo at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2012-11/txt/msg01805.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55359 --- Comment #2 from rsandifo at gcc dot gnu.org 2012-11-19 19:00:01 UTC --- Sorry for the breakage. (In reply to comment #1) > Caused by http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192741 > lowpart_bit_field_p looks weird, I don't see how BITS_PER_WORD is relevant > there, what IMHO matters is whether the subreg is valid or not. While the > first hunk that uses this function uses validate_subreg, the second one doesn't > and > attempts to create an invalid subreg (subreg:V2DF (reg:OI) 8), where the byte > offset is not a multiple of V2DFmode size. I suppose we're going to have to decide whether simplify_subreg should do the validation itself, or whether it's up to the caller. simplify_subreg asserts things that validate_subreg checks, which implies the latter, but simplify_gen_subreg explicitly calls validate_subreg. Personally I'd prefer it if simplify_subreg and simplify_gen_subreg checked for invalid subregs and return null. Does that sound OK?