From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10354 invoked by alias); 13 Mar 2015 10:37:36 -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 10301 invoked by uid 48); 13 Mar 2015 10:37:32 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/65409] [4.8/4.9/5 Regression] ICE in store_field Date: Fri, 13 Mar 2015 10:37: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-Version: 4.9.3 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: ebotcazou at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.5 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: 2015-03/txt/msg01415.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65409 --- Comment #4 from Jakub Jelinek --- I've so far came up with: --- gcc/expr.c.jj 2015-01-19 09:31:15.000000000 +0100 +++ gcc/expr.c 2015-03-13 11:30:25.699805379 +0100 @@ -6656,14 +6656,18 @@ store_field (rtx target, HOST_WIDE_INT b && (bitpos % BITS_PER_UNIT) == 0 && (bitsize % BITS_PER_UNIT) == 0))) { - gcc_assert (MEM_P (target) && MEM_P (temp) + gcc_assert (MEM_P (target) + && (MEM_P (temp) || GET_CODE (temp) == PARALLEL) && (bitpos % BITS_PER_UNIT) == 0); target = adjust_address (target, VOIDmode, bitpos / BITS_PER_UNIT); - emit_block_move (target, temp, - GEN_INT ((bitsize + BITS_PER_UNIT - 1) - / BITS_PER_UNIT), - BLOCK_OP_NORMAL); + HOST_WIDE_INT bytesize + = (bitsize + BITS_PER_UNIT - 1) / BITS_PER_UNIT; + if (GET_CODE (temp) == PARALLEL) + emit_group_store (target, temp, TREE_TYPE (exp), bytesize); + else + emit_block_move (target, temp, GEN_INT (bytesize), + BLOCK_OP_NORMAL); return const0_rtx; } which seems to DTRT in this case.