From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7876 invoked by alias); 13 Jun 2011 19:37:01 -0000 Received: (qmail 7867 invoked by uid 22791); 13 Jun 2011 19:37:01 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 13 Jun 2011 19:36:45 +0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/49382] -O2 -g: DW_AT_location at the very first PC is already modified X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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 Date: Mon, 13 Jun 2011 19:37:00 -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 X-SW-Source: 2011-06/txt/msg01140.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49382 --- Comment #2 from Jakub Jelinek 2011-06-13 19:36:42 UTC --- Alternatively, even before statement frontiers we could special case parameters (PARM_DECLs and vars with PARM_DECL DECL_ABSTRACT_ORIGIN) before the first insn in a function and just emit a zero-length location range for those. So you would get: .LLST0: .quad .LVL1 # Location list begin address (*.LLST0) .quad .LVL1 # Location list end address (*.LLST0) .value 0x1 # Location expression size .byte 0x55 # DW_OP_reg5 .quad .LVL1 # Location list begin address (*.LLST0) .quad .LVL2-1 # Location list end address (*.LLST0) .value 0x3 # Location expression size .byte 0x75 # DW_OP_breg5 .sleb128 1 .byte 0x9f # DW_OP_stack_value .quad .LVL2-1 # Location list begin address (*.LLST0) .quad .LFE1 # Location list end address (*.LLST0) .value 0x6 # Location expression size .byte 0xf3 # DW_OP_GNU_entry_value .uleb128 0x1 .byte 0x55 # DW_OP_reg5 .byte 0x23 # DW_OP_plus_uconst .uleb128 0x1 .byte 0x9f # DW_OP_stack_value .quad 0 # Location list terminator begin (*.LLST0) .quad 0 # Location list terminator end (*.LLST0) Wonder how many dwarflints etc. would complain about it loudly though.