From 61a74079b01d0229d95f14d160bcbe6c4f88147f Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Wed, 4 Sep 2013 16:14:28 +0200 Subject: Makefile.in (ipa-devirt.o): Add dependency on diagnostic.h * Makefile.in (ipa-devirt.o): Add dependency on diagnostic.h * ipa-devirt.c: Include diganostic.h (odr_type_d): Add types and types_set. (hash_type_name): Work for types with vtables during LTO. (odr_hasher::remove): Fix comment; destroy types_set. (add_type_duplicate): New function, (get_odr_type): Use it. (dump_type_inheritance_graph): Dump type duplicates. * ipa.c (symtab_remove_unreachable_nodes): Build type inheritance graph. * tree.c (types_same_for_odr): Give exact answers on types with virtual tables. From-SVN: r202258 --- gcc/lto-streamer-out.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/lto-streamer-out.c') diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index dfcd135..f27f2fd 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -124,8 +124,11 @@ output_type_ref (struct output_block *ob, tree node) static bool tree_is_indexable (tree t) { + /* Parameters and return values of functions of variably modified types + must go to global stream, because they may be used in the type + definition. */ if (TREE_CODE (t) == PARM_DECL || TREE_CODE (t) == RESULT_DECL) - return false; + return variably_modified_type_p (TREE_TYPE (DECL_CONTEXT (t)), NULL_TREE); else if (TREE_CODE (t) == VAR_DECL && decl_function_context (t) && !TREE_STATIC (t)) return false; -- cgit v1.1