From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14436 invoked by alias); 20 Sep 2013 16:29: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 14376 invoked by uid 48); 20 Sep 2013 16:29:57 -0000 From: "vmakarov at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/57915] [4.8/4.9 Regression] ICE in set_address_disp, at rtlanal.c:5537 Date: Fri, 20 Sep 2013 16:29:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 4.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vmakarov at redhat dot com X-Bugzilla-Status: NEW 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: cc 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-09/txt/msg01530.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57915 Vladimir Makarov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vmakarov at redhat dot com --- Comment #4 from Vladimir Makarov --- The address in question is (plus (symbol_ref ...) (const_int 4)) LRA finds two displacements (symbol_ref and const_int) although only one displacement is allowed. The correct canonical address should be: (const (plus (symbol_ref ...) (const_int 4))) Non-canonical address is created from (reg ...) by 1st constant propagation pass (cprop1). I believe the problem should be fixed there. As for reload pass, it has code transforming address (plus some const some const) into (const (plus some const some const)). It was probably a problem fix in a wrong place. There is no need to complicate LRA more and implement analogous code in LRA. As I wrote I believe it should be fixed in cprop1 by generating the correct canonical address.