summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-03-31 17:03:16 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-03-31 17:03:16 +0000
commitd2e9c25258679cb1ffb7a84588d458035c6d9c02 (patch)
treee83e1c3818fcf99d82f667f00483358bf46c0078
parent0428647ca1931c9dbb97222e1becc7c9b51cea5d (diff)
downloadgcc-d2e9c25258679cb1ffb7a84588d458035c6d9c02.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221797 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/ipa-devirt.c3
-rw-r--r--gcc/lto/ChangeLog5
-rw-r--r--gcc/tree.c1
4 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 150525b7ba9..ea149b40f14 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2015-03-27 Jan Hubicka <hubicka@ucw.cz>
+
+ * 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.
+
2015-03-31 Martin Liska <mliska@suse.cz>
PR ipa/65557
diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c
index 534f6c0220d..6969f5a04be 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",
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index bf2b51bba62..085ce9f4a04 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-27 Jan Hubicka <hubicka@ucw.cz>
+
+ * lto.c (lto_read_decls): Move code registering odr types out
+ of TYPE_CANONICAL conditional and also register polymorphic types.
+
2015-03-26 Jan Hubicka <hubicka@ucw.cz>
* lto-symtab.c (lto_symtab_merge_decls_2): Silence warning on
diff --git a/gcc/tree.c b/gcc/tree.c
index 0b8e8961b08..151e3e27bad 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -5139,6 +5139,7 @@ need_assembler_name_p (tree decl)
&& decl == TYPE_NAME (TREE_TYPE (decl))
&& !is_lang_specific (TREE_TYPE (decl))
&& AGGREGATE_TYPE_P (TREE_TYPE (decl))
+ && !TYPE_ARTIFICIAL (TREE_TYPE (decl))
&& !variably_modified_type_p (TREE_TYPE (decl), NULL_TREE)
&& !type_in_anonymous_namespace_p (TREE_TYPE (decl)))
return !DECL_ASSEMBLER_NAME_SET_P (decl);