aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-devirt.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2015-03-31 19:03:16 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2015-03-31 17:03:16 +0000
commit36ceb0e3ccbac8324601234546210239d334bb0a (patch)
treee83e1c3818fcf99d82f667f00483358bf46c0078 /gcc/ipa-devirt.c
parent12cc8c723ed0dccdbb6b2b590706b1344d468c55 (diff)
downloadgcc-36ceb0e3ccbac8324601234546210239d334bb0a.zip
gcc-36ceb0e3ccbac8324601234546210239d334bb0a.tar.gz
gcc-36ceb0e3ccbac8324601234546210239d334bb0a.tar.bz2
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
Diffstat (limited to 'gcc/ipa-devirt.c')
-rw-r--r--gcc/ipa-devirt.c3
1 files changed, 2 insertions, 1 deletions
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",