From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10655 invoked by alias); 12 Feb 2013 02:02:59 -0000 Received: (qmail 10361 invoked by uid 48); 12 Feb 2013 02:02:34 -0000 From: "matt at use dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/56231] warning traces have bogus line information when using LTO Date: Tue, 12 Feb 2013 02:02: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: lto X-Bugzilla-Severity: major X-Bugzilla-Who: matt at use dot net X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth 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: 2013-02/txt/msg01125.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56231 --- Comment #12 from Matt Hargett 2013-02-12 02:02:33 UTC --- looking at the patch for merging elsewhere, I noticed that location_t lto_input_location (struct bitpack_d *bp, struct data_in *data_in) { + static const char *current_file; + static int current_line; + static int current_col; bool file_change, line_change, column_change; unsigned len; - bool prev_file = data_in->current_file != NULL; + bool prev_file = current_file != NULL; current_file is potentially of unknown value on the comparison in the last line, right? or is there some static const initialization rule that implicitly initializes it to 0?