From 36ceb0e3ccbac8324601234546210239d334bb0a Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Tue, 31 Mar 2015 19:03:16 +0200 Subject: tree.c (need_assembler_name_p): Artificial types have no ODR names. * tree.c (need_assembler_name_p): Artificial types have no ODR names. * ipa-devirt.c (warn_odr): Do not try to apply ODR cache when no caching is done. * lto.c (lto_read_decls): Move code registering odr types out of TYPE_CANONICAL conditional and also register polymorphic types. From-SVN: r221797 --- gcc/ipa-devirt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/ipa-devirt.c') diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index 534f6c0..6969f5a 100644 --- a/gcc/ipa-devirt.c +++ b/gcc/ipa-devirt.c @@ -939,7 +939,8 @@ warn_odr (tree t1, tree t2, tree st1, tree st2, /* ODR warnings are output druing LTO streaming; we must apply location cache for potential warnings to be output correctly. */ - lto_location_cache::current_cache->apply_location_cache (); + if (lto_location_cache::current_cache) + lto_location_cache::current_cache->apply_location_cache (); if (!warning_at (DECL_SOURCE_LOCATION (TYPE_NAME (t1)), OPT_Wodr, "type %qT violates one definition rule", -- cgit v1.1