From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124032 invoked by alias); 2 Jul 2015 17:22:41 -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 123971 invoked by uid 48); 2 Jul 2015 17:22:37 -0000 From: "rsandifo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/66728] [5/6 Regression] CONST_WIDE_INT causes corrupted DWARF debug info Date: Thu, 02 Jul 2015 17:22:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 5.1.1 X-Bugzilla-Keywords: wrong-debug X-Bugzilla-Severity: normal X-Bugzilla-Who: rsandifo at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rsandifo at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on assigned_to everconfirmed 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-07/txt/msg00184.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66728 rsandifo at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2015-07-02 Assignee|unassigned at gcc dot gnu.org |rsandifo at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #3 from rsandifo at gcc dot gnu.org --- (In reply to Ulrich Weigand from comment #1) > A bit of debugging shows that what's going on here is this: > > add_const_value_attribute is called with the following constant RTL: > (const_wide_int 0x80000000000000000000000000000000) > > The routine then does: > add_AT_wide (die, DW_AT_const_value, > std::make_pair (rtl, GET_MODE (rtl))); > > Note that GET_MODE (rtl) is VOIDmode. This apparently causes creation of a > wide_int value with precision 0: > { = {val = {0, -9223372036854775808, 2}, len = 2, > precision = 0} > > This seems already wrong, but doesn't quite explain the inconsistent output. Yeah, wide_ints shouldn't have precision 0. I think the later problems do follow from that, although like you say there is probably a disconnect between the way the DIEs are handled as well.