From aaf8a23ef3ff2055dde65871b438883ecc067bb0 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Wed, 25 Jun 2014 01:14:26 +0200 Subject: class.c (check_methods, [...]): Guard VINDEX checks by FUNCTION_DECL check. * class.c (check_methods, create_vtable_ptr, determine_key_method, add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by FUNCTION_DECL check. * cp-tree.h (lang_decl_ns): Add ns_using and ns_users. (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns. (DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL. (DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT. * tree.c (find_decls_types_r): Do not check DECL_VINDEX for TYPE_DECL. * tree.h (DECL_VINDEX, DECL_SAVED_TREE): Restrict to DECL_FUNCTION. * tree-core.h (tree_decl_non_common): Move saved_tree and vindex... (tree_function_decl): ... here. * tree-streamer-out.c (write_ts_decl_non_common_tree_pointers): Move streaming of vindex to ... (write_ts_function_decl_tree_pointers): ... here. * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers): Do not stream DECL_VINDEX. (lto_input_ts_function_decl_tree_pointers): Stream it here. * lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to .. (mentions_vars_p_function): ... here. (compare_tree_sccs_1): Update VINDEX checks. (lto_fixup_prevailing_decls): Likewise. From-SVN: r211960 --- gcc/tree-streamer-in.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gcc/tree-streamer-in.c') diff --git a/gcc/tree-streamer-in.c b/gcc/tree-streamer-in.c index 83b6a69..ee1c955 100644 --- a/gcc/tree-streamer-in.c +++ b/gcc/tree-streamer-in.c @@ -726,7 +726,6 @@ lto_input_ts_decl_non_common_tree_pointers (struct lto_input_block *ib, { if (TREE_CODE (expr) == TYPE_DECL) DECL_ORIGINAL_TYPE (expr) = stream_read_tree (ib, data_in); - DECL_VINDEX (expr) = stream_read_tree (ib, data_in); } @@ -773,8 +772,8 @@ static void lto_input_ts_function_decl_tree_pointers (struct lto_input_block *ib, struct data_in *data_in, tree expr) { - /* DECL_STRUCT_FUNCTION is handled by lto_input_function. FIXME lto, - maybe it should be handled here? */ + DECL_VINDEX (expr) = stream_read_tree (ib, data_in); + /* DECL_STRUCT_FUNCTION is loaded on demand by cgraph_get_body. */ DECL_FUNCTION_PERSONALITY (expr) = stream_read_tree (ib, data_in); /* DECL_FUNCTION_SPECIFIC_TARGET is regenerated from attributes. */ DECL_FUNCTION_SPECIFIC_OPTIMIZATION (expr) = stream_read_tree (ib, data_in); -- cgit v1.1