From 0982fd6497be2ef3879b60443b657efad1966835 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Fri, 17 Sep 2010 14:18:39 +0000 Subject: [PATCH] lto-streamer-in.c (lto_input_ts_translation_unit_decl_tree_pointers): Properly copy the read string. 2010-09-17 Richard Guenther * lto-streamer-in.c (lto_input_ts_translation_unit_decl_tree_pointers): Properly copy the read string. From-SVN: r164371 --- gcc/ChangeLog | 5 +++++ gcc/lto-streamer-in.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c36b4f0a670..a900bdad98d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-09-17 Richard Guenther + + * lto-streamer-in.c (lto_input_ts_translation_unit_decl_tree_pointers): + Properly copy the read string. + 2010-09-17 Joseph Myers * doc/options.texi (Variable): Document. diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c index 83315e86d1b..c6d3c9bacc1 100644 --- a/gcc/lto-streamer-in.c +++ b/gcc/lto-streamer-in.c @@ -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); }