From fc5796ee0cbedbb38768074f4ae968b6f86d35f2 Mon Sep 17 00:00:00 2001 From: Terry Guo Date: Fri, 13 Sep 2013 05:26:32 +0000 Subject: [PATCH] backport: re PR lto/54598 (ICE: Segmentation fault in lto1 at tree-streamer-in.c:unpack_ts_fixed_cst_value_fields()) 2013-09-12 Terry Guo Backport from mainline 2012-09-17 Richard Guenther PR lto/54598 * tree-streamer-in.c (unpack_ts_real_cst_value_fields): Use ggc'ed FIXED_VALUE_TYPE instead of struct fixed_value. From-SVN: r202551 --- gcc/ChangeLog | 9 +++++++++ gcc/tree-streamer-in.c | 11 +++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a148b16f77c6..b9f8c33a9833 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2013-09-12 Terry Guo + + Backport from mainline + 2012-09-17 Richard Guenther + + PR lto/54598 + * tree-streamer-in.c (unpack_ts_real_cst_value_fields): Use ggc'ed + FIXED_VALUE_TYPE instead of struct fixed_value. + 2013-09-10 Richard Earnshaw PR target/58361 diff --git a/gcc/tree-streamer-in.c b/gcc/tree-streamer-in.c index 840f4c2cb6d8..f2b12243b12a 100644 --- a/gcc/tree-streamer-in.c +++ b/gcc/tree-streamer-in.c @@ -172,12 +172,11 @@ unpack_ts_real_cst_value_fields (struct bitpack_d *bp, tree expr) static void unpack_ts_fixed_cst_value_fields (struct bitpack_d *bp, tree expr) { - struct fixed_value fv; - - fv.mode = bp_unpack_enum (bp, machine_mode, MAX_MACHINE_MODE); - fv.data.low = bp_unpack_var_len_int (bp); - fv.data.high = bp_unpack_var_len_int (bp); - TREE_FIXED_CST (expr) = fv; + FIXED_VALUE_TYPE *fp = ggc_alloc_fixed_value (); + fp->mode = bp_unpack_enum (bp, machine_mode, MAX_MACHINE_MODE); + fp->data.low = bp_unpack_var_len_int (bp); + fp->data.high = bp_unpack_var_len_int (bp); + TREE_FIXED_CST_PTR (expr) = fp; } -- 2.47.2