lto-streamer-in.c (lto_input_ts_translation_unit_decl_tree_pointers): Properly copy...
authorRichard Guenther <rguenther@suse.de>
Fri, 17 Sep 2010 14:18:39 +0000 (14:18 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 17 Sep 2010 14:18:39 +0000 (14:18 +0000)
2010-09-17  Richard Guenther  <rguenther@suse.de>

* lto-streamer-in.c (lto_input_ts_translation_unit_decl_tree_pointers):
Properly copy the read string.

From-SVN: r164371

gcc/ChangeLog
gcc/lto-streamer-in.c

index c36b4f0a670456d245f1ec5c3120d23368a69839..a900bdad98dbeed2b41bd80a904c24aac8e9f650 100644 (file)
@@ -1,3 +1,8 @@
+2010-09-17  Richard Guenther  <rguenther@suse.de>
+
+       * lto-streamer-in.c (lto_input_ts_translation_unit_decl_tree_pointers):
+       Properly copy the read string.
+
 2010-09-17  Joseph Myers  <joseph@codesourcery.com>
 
        * doc/options.texi (Variable): Document.
index 83315e86d1bdbd6aa3ddedcfd012f6332635558b..c6d3c9bacc1ef246c5325e6bab4d62265b03363e 100644 (file)
@@ -2241,7 +2241,7 @@ lto_input_ts_translation_unit_decl_tree_pointers (struct lto_input_block *ib,
                                                  struct data_in *data_in,
                                                  tree expr)
 {
-  TRANSLATION_UNIT_LANGUAGE (expr) = input_string (data_in, ib);
+  TRANSLATION_UNIT_LANGUAGE (expr) = xstrdup (input_string (data_in, ib));
   VEC_safe_push (tree, gc, all_translation_units, expr);
 }