From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13822 invoked by alias); 22 Oct 2009 14:06:10 -0000 Received: (qmail 13693 invoked by uid 22791); 22 Oct 2009 14:06:09 -0000 X-SWARE-Spam-Status: No, hits=-7.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: sourceware.org Received: from cantor.suse.de (HELO mx1.suse.de) (195.135.220.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 22 Oct 2009 14:06:03 +0000 Received: from relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id 6666693A00; Thu, 22 Oct 2009 16:06:01 +0200 (CEST) Date: Thu, 22 Oct 2009 14:29:00 -0000 From: Richard Guenther To: gcc-patches@gcc.gnu.org Cc: Diego Novillo Subject: [PATCH][LTO] Fix PR41791 Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2009-10/txt/msg01421.txt.bz2 We were forgetting to stream the system header flag. Bootstrap & regtest in progress, committing as obvious. Richard. 2009-10-22 Richard Guenther PR lto/41791 * lto-streamer-out.c (lto_output_location): Stream the system header flag. * lto-streamer-in.c (lto_input_location): Likewise. * g++.dg/lto/20091022-2_0.C: New testcase. Index: gcc/lto-streamer-out.c =================================================================== *** gcc/lto-streamer-out.c (revision 153456) --- gcc/lto-streamer-out.c (working copy) *************** lto_output_location (struct output_block *** 618,623 **** --- 618,624 ---- output_string (ob, ob->main_stream, xloc.file); output_sleb128 (ob, xloc.line); output_sleb128 (ob, xloc.column); + output_sleb128 (ob, xloc.sysp); ob->current_file = xloc.file; ob->current_line = xloc.line; Index: gcc/lto-streamer-in.c =================================================================== *** gcc/lto-streamer-in.c (revision 153456) --- gcc/lto-streamer-in.c (working copy) *************** lto_input_location (struct lto_input_blo *** 283,295 **** xloc.file = canon_file_name (xloc.file); xloc.line = lto_input_sleb128 (ib); xloc.column = lto_input_sleb128 (ib); if (data_in->current_file != xloc.file) { if (data_in->current_file) linemap_add (line_table, LC_LEAVE, false, NULL, 0); ! linemap_add (line_table, LC_ENTER, false, xloc.file, xloc.line); } else if (data_in->current_line != xloc.line) linemap_line_start (line_table, xloc.line, xloc.column); --- 283,296 ---- xloc.file = canon_file_name (xloc.file); xloc.line = lto_input_sleb128 (ib); xloc.column = lto_input_sleb128 (ib); + xloc.sysp = lto_input_sleb128 (ib); if (data_in->current_file != xloc.file) { if (data_in->current_file) linemap_add (line_table, LC_LEAVE, false, NULL, 0); ! linemap_add (line_table, LC_ENTER, xloc.sysp, xloc.file, xloc.line); } else if (data_in->current_line != xloc.line) linemap_line_start (line_table, xloc.line, xloc.column); Index: gcc/testsuite/g++.dg/lto/20091022-2_0.C =================================================================== *** gcc/testsuite/g++.dg/lto/20091022-2_0.C (revision 0) --- gcc/testsuite/g++.dg/lto/20091022-2_0.C (revision 0) *************** *** 0 **** --- 1,12 ---- + // { dg-lto-do link } + // { dg-lto-options {{-O3 -flto -Winline}} } + + #include + + int + main() + { + std::string i; + i = "abc"; + } +