From patchwork Fri Sep 17 14:13:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Fixup T_U_D reading Date: Fri, 17 Sep 2010 04:13:24 -0000 From: Richard Guenther X-Patchwork-Id: 65081 Message-Id: To: gcc-patches@gcc.gnu.org I forgot to copy the string - we only get a reference to the string section. Oops. Bootstrapped and tested on x86_64-unknown-linux-gnu, committed. Richard. 2010-09-17 Richard Guenther * lto-streamer-in.c (lto_input_ts_translation_unit_decl_tree_pointers): Properly copy the read string. Index: gcc/lto-streamer-in.c =================================================================== --- gcc/lto-streamer-in.c (revision 164368) +++ gcc/lto-streamer-in.c (working copy) @@ -2241,7 +2271,7 @@ lto_input_ts_translation_unit_decl_tree_ 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); }