From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23745 invoked by alias); 7 Nov 2012 22:12:02 -0000 Received: (qmail 23666 invoked by uid 48); 7 Nov 2012 22:11:47 -0000 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/55142] [4.8 Regression] internal compiler error: in plus_constant, at explow.c:88 Date: Wed, 07 Nov 2012 22:12: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: hjl.tools at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ebotcazou 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/msg00661.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55142 --- Comment #21 from H.J. Lu 2012-11-07 22:11:46 UTC --- (In reply to comment #20) > If you compile the testcase with the unmodified compiler but without -fPIC, you > get in the assembly file: > > movl %edx, _dl_rtld_map-1073742800(,%eax,4) > > I presume that's wrong, correct? Yet the RTL instruction is: That is not wrong. > (insn:TI 43 38 44 4 (set (mem/f:SI (zero_extend:DI (plus:SI (ashift:SI (reg:SI > 0 ax [87]) > (const_int 2 [0x2])) > (const:SI (plus:SI (symbol_ref:SI ("_dl_rtld_map") [flags > 0x42] ) > (const_int -1073742800 [0xffffffffbffffc30]))))) [3 > *_8+0 S4 A32]) > (reg:SI 1 dx [orig:82 dyn ] [82])) pr55142.c:32 65 {*movsi_internal} > (expr_list:REG_DEAD (reg:SI 0 ax [87]) > (nil))) > > and there is a zero_extend. (,%eax,4) generates a 0x67 address-size prefix, which zero-extends 32-bit address to 64-bit.