* [PATCH][LTO] Fix PR41791
@ 2009-10-22 14:29 Richard Guenther
0 siblings, 0 replies; only message in thread
From: Richard Guenther @ 2009-10-22 14:29 UTC (permalink / raw)
To: gcc-patches; +Cc: Diego Novillo
We were forgetting to stream the system header flag.
Bootstrap & regtest in progress, committing as obvious.
Richard.
2009-10-22 Richard Guenther <rguenther@suse.de>
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 <string>
+
+ int
+ main()
+ {
+ std::string i;
+ i = "abc";
+ }
+
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-10-22 14:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-22 14:29 [PATCH][LTO] Fix PR41791 Richard Guenther
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).