From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24286 invoked by alias); 11 Jun 2013 15:28:59 -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 24248 invoked by uid 55); 11 Jun 2013 15:28:56 -0000 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/57586] ICE when expanding volatile asm using unaligned pointer Date: Tue, 11 Jun 2013 15:28: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: major X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: WAITING 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: 2013-06/txt/msg00574.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57586 --- Comment #5 from rguenther at suse dot de --- On Tue, 11 Jun 2013, jgreenhalgh at gcc dot gnu.org wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57586 > > --- Comment #4 from jgreenhalgh at gcc dot gnu.org --- > Created attachment 30293 > --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30293&action=edit > Less reduced failing testcase > > Yes, the same thing happens for packed versions of those structs. Perhaps the > attached, less-reduced, version of the testcase will make the issue more clear. > This expanded testcase fails with the same error and ICE: > > ../build-arm-none-eabi/install/bin/arm-none-eabi-gcc > ../testcases/pr-less-reduced.c -O1 -Wall > ../testcases/pr-less-reduced.c: In function 'inet_rtm_getroute': > ../testcases/pr-less-reduced.c:22:3: error: output number 0 not directly > addressable > __asm__ __volatile__("" > ^ > ../testcases/pr-less-reduced.c:22:3: internal compiler error: in > expand_asm_operands, at stmt.c:910 > 0x8c1be8 expand_asm_operands > /work/oban-dev/src/gcc/gcc/stmt.c:910 > 0x8c28a7 expand_asm_stmt(gimple_statement_d*) > /work/oban-dev/src/gcc/gcc/stmt.c:1151 > 0x5dfe5f expand_gimple_stmt_1 > /work/oban-dev/src/gcc/gcc/cfgexpand.c:2154 > 0x5dfe5f expand_gimple_stmt > /work/oban-dev/src/gcc/gcc/cfgexpand.c:2309 > 0x5e1b69 expand_gimple_basic_block > /work/oban-dev/src/gcc/gcc/cfgexpand.c:4143 > 0x5e4a33 gimple_expand_cfg > /work/oban-dev/src/gcc/gcc/cfgexpand.c:4662 > Please submit a full bug report, > with preprocessed source if appropriate. > Please include the complete backtrace with any bug report. > See for instructions. I suppose the question is why /* EXPAND_INITIALIZER will not generate code for valid initializer constants, but will still generate code for other types of operand. This is the behavior we want for constant constraints. */ op = expand_expr (val, NULL_RTX, VOIDmode, allows_reg ? EXPAND_NORMAL : allows_mem ? EXPAND_MEMORY : EXPAND_INITIALIZER); thus, EXPAND_MEMORY returns a non-MEM_P (does it?).