From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113186 invoked by alias); 16 Apr 2015 14:24:01 -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 112819 invoked by uid 48); 16 Apr 2015 14:23:56 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/65771] [5 Regression] ICE (in loc_list_from_tree, at dwarf2out.c:14964) on arm-linux-gnueabihf Date: Thu, 16 Apr 2015 14:24: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: 5.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_gcctarget 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-04/txt/msg01367.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65771 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Target|arm-linux-gnueabihf | --- Comment #7 from Jakub Jelinek --- Happens on x86_64-linux too, started with r214899. So, at *.optimized we have: # DEBUG D#2 => b # DEBUG D#1 => a[D#2].t # DEBUG c => D#1 which is expanded as: (debug_insn 5 2 6 2 (var_location:SI D#2 (mem/c:SI (symbol_ref:SI ("b") [flags 0x82] ) [0 b+0 S4 A32])) pr65771.c:8 -1 (nil)) (debug_insn 6 5 7 2 (var_location:SI D#1 (mem/j:SI (plus:SI (ashift:SI (debug_expr:SI D#2) (const_int 3 [0x3])) (const:SI (plus:SI (symbol_ref:SI ("a") [flags 0xaa] ) (const_int 4 [0x4])))) [0 a[D#2].t+0 S4 A32])) pr65771.c:8 -1 (nil)) (debug_insn 7 6 0 2 (var_location:SI c (debug_expr:SI D#1)) pr65771.c:8 -1 (nil)) and vartracking makes: (note 15 2 14 2 (var_location c (mem/j:SI (plus:SI (ashift:SI (mem/c:SI (symbol_ref:SI ("b") [flags 0x82] ) [0 b+0 S4 A 32]) (const_int 3 [0x3])) (const:SI (plus:SI (symbol_ref:SI ("a") [flags 0xaa] ) (const_int 4 [0x4])))) [0 a[D#2].t+0 S4 A32])) NOTE_INSN_VAR_LOCATION) out of this. Var-tracking for obvious reasons can only replace the DEBUG_EXPR_DECLs when they appear in debug_expr RTL, because we track DEBUG_EXPR_DECL values at RTL as RTL expressions, rather than tree. The problem is I believe that we try to use the MEM_EXPR as a fallback and if it contains DEBUG_EXPR_DECL, dwarf2out.c is upset.