aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-10-22 15:36:46 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-10-22 15:36:46 +0000
commitea989a1f5a0e68fac1a5673a6bf20dd7840615a9 (patch)
treef269c6387be7a066f0adfad84372d932aa7974ce /gcc
parent487102294c3844ed86ff8689a55b7931608b9170 (diff)
downloadgcc-ea989a1f5a0e68fac1a5673a6bf20dd7840615a9.zip
gcc-ea989a1f5a0e68fac1a5673a6bf20dd7840615a9.tar.gz
gcc-ea989a1f5a0e68fac1a5673a6bf20dd7840615a9.tar.bz2
re PR lto/41791 (LTO warnings with -Winline)
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. From-SVN: r153459
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/lto-streamer-in.c3
-rw-r--r--gcc/lto-streamer-out.c1
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/lto/20091022-2_0.C12
5 files changed, 27 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5489001..6d68948 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
2009-10-22 Razya Ladelsky <razya@il.ibm.com>
* cfgloopmanip.c (duplicate_subloops): Export.
diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c
index f31b319..000be33 100644
--- a/gcc/lto-streamer-in.c
+++ b/gcc/lto-streamer-in.c
@@ -283,13 +283,14 @@ lto_input_location (struct lto_input_block *ib, struct data_in *data_in)
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, false, xloc.file, xloc.line);
+ 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);
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index 40bba1e..d593aac 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -618,6 +618,7 @@ lto_output_location (struct output_block *ob, location_t loc)
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;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7884ac1..ba31a60 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2009-10-22 Richard Guenther <rguenther@suse.de>
+ PR lto/41791
+ * g++.dg/lto/20091022-2_0.C: New testcase.
+
+2009-10-22 Richard Guenther <rguenther@suse.de>
+
PR lto/41730
* g++.dg/lto/20091022-1_0.C: New testcase.
diff --git a/gcc/testsuite/g++.dg/lto/20091022-2_0.C b/gcc/testsuite/g++.dg/lto/20091022-2_0.C
new file mode 100644
index 0000000..29ed9b6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/20091022-2_0.C
@@ -0,0 +1,12 @@
+// { dg-lto-do link }
+// { dg-lto-options {{-O3 -flto -Winline}} }
+
+#include <string>
+
+int
+main()
+{
+ std::string i;
+ i = "abc";
+}
+