aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-streamer-out.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-12-15 16:30:22 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-12-15 16:30:22 +0000
commit2a71eb48e4348f8bc33f9b02e45fd69adbe66b9c (patch)
treeb88b0549fc1a571763835c3ca441355bf819abe1 /gcc/lto-streamer-out.c
parent9f81eaccf9ab5a38f9a988ccc63a3299e18ef5b5 (diff)
downloadgcc-2a71eb48e4348f8bc33f9b02e45fd69adbe66b9c.zip
gcc-2a71eb48e4348f8bc33f9b02e45fd69adbe66b9c.tar.gz
gcc-2a71eb48e4348f8bc33f9b02e45fd69adbe66b9c.tar.bz2
tree.c (free_lang_data_in_binfo): Do not free BINFO_OFFSET and BINFO_VPTR_FIELD.
2009-12-15 Richard Guenther <rguenther@suse.de> * tree.c (free_lang_data_in_binfo): Do not free BINFO_OFFSET and BINFO_VPTR_FIELD. (free_lang_data_in_type): Do not free TYPE_STUB_DECL if we generate debug information. (free_lang_data_in_decl): Do not free DECL_SIZE_UNIT, DECL_SIZE, DECL_FIELD_OFFSET and DECL_FCONTEXT. (free_lang_data): Do not disable debuginfo. * lto-streamer-out.c (write_symbol_vec): Deal with non-constant DECL_SIZE. (pack_ts_base_value_fields): Write types with false TREE_ASM_WRITTEN. (lto_output_ts_type_tree_pointers): Stream TYPE_STUB_DECL. * lto-streamer-in.c (lto_input_ts_type_tree_pointers): Stream TYPE_STUB_DECL. * dwarf2out.c (add_pure_or_virtual_attribute): Check for DECL_CONTEXT. (gen_type_die_for_member): Test for TYPE_STUB_DECL. * opts.c (decode_options): Do not disable var-tracking for lto. * doc/invoke.texi (-flto): Document -flto vs. -g experimental status. (-fwhopr): Document experimental status. lto/ * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET. (lto_post_options): Do not disable debuginfo. From-SVN: r155259
Diffstat (limited to 'gcc/lto-streamer-out.c')
-rw-r--r--gcc/lto-streamer-out.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index 920cd27..c489e42 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -342,7 +342,8 @@ pack_ts_base_value_fields (struct bitpack_d *bp, tree expr)
bp_pack_value (bp, DECL_UNSIGNED (expr), 1);
else if (TYPE_P (expr))
bp_pack_value (bp, TYPE_UNSIGNED (expr), 1);
- bp_pack_value (bp, TREE_ASM_WRITTEN (expr), 1);
+ /* We write debug info two times, do not confuse the second one. */
+ bp_pack_value (bp, TYPE_P (expr) ? 0 : TREE_ASM_WRITTEN (expr), 1);
bp_pack_value (bp, TREE_NO_WARNING (expr), 1);
bp_pack_value (bp, TREE_USED (expr), 1);
bp_pack_value (bp, TREE_NOTHROW (expr), 1);
@@ -966,6 +967,7 @@ lto_output_ts_type_tree_pointers (struct output_block *ob, tree expr,
lto_output_tree_or_ref (ob, TYPE_BINFO (expr), ref_p);
lto_output_tree_or_ref (ob, TYPE_CONTEXT (expr), ref_p);
lto_output_tree_or_ref (ob, TYPE_CANONICAL (expr), ref_p);
+ lto_output_tree_or_ref (ob, TYPE_STUB_DECL (expr), ref_p);
}
@@ -2335,7 +2337,9 @@ write_symbol_vec (struct lto_streamer_cache_d *cache,
break;
}
- if (kind == GCCPK_COMMON && DECL_SIZE (t))
+ if (kind == GCCPK_COMMON
+ && DECL_SIZE (t)
+ && TREE_CODE (DECL_SIZE (t)) == INTEGER_CST)
size = (((uint64_t) TREE_INT_CST_HIGH (DECL_SIZE (t))) << 32)
| TREE_INT_CST_LOW (DECL_SIZE (t));
else