]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR lto/54598 (ICE: Segmentation fault in lto1 at tree-streamer-in.c:unpack_ts_fixe...
authorRichard Guenther <rguenther@suse.de>
Mon, 17 Sep 2012 16:03:44 +0000 (16:03 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Mon, 17 Sep 2012 16:03:44 +0000 (16:03 +0000)
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: r191394

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

index c1ba2e5b74319aa7b1197ff0360ec30e0287f92d..d0a6303768e50854e608cb97db0066ce41841bd8 100644 (file)
@@ -1,3 +1,9 @@
+2012-09-17  Georg-Johann Lay  <avr@gjlay.de>
+
+       PR lto/54598
+       * tree-streamer-in.c (unpack_ts_real_cst_value_fields): Use ggc'ed
+       FIXED_VALUE_TYPE instead of struct fixed_value.
+
 2012-09-17  Georg-Johann Lay  <avr@gjlay.de>
 
        * config/avr/avr.c (CONST_FIXED_P): Remove define.
index a38fb470b1f88a4d2a70e9cc43976188e96a24b7..5f9f7a2fef700abbc36c94521f193996eb2e3a9c 100644 (file)
@@ -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;
 }