summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2016-03-10 16:02:00 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2016-03-10 16:02:00 +0000
commit502bc5d0496ee5f97f322fd81b3080b78c5d4599 (patch)
tree1d1e94de6354962ca6a93df224428f35672794e9
parenta2eb12715907d6f20aa25e9acf8242d1b153f1e1 (diff)
downloadgcc-502bc5d0496ee5f97f322fd81b3080b78c5d4599.tar.gz
PR lto/69589
* tree.c (need_assembler_name_p): Only record main variant type names. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234112 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index cb91e97c223..ab621ae922f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2016-03-10 Jan Hubicka <hubicka@ucw.cz>
+
+ PR lto/69589
+ * tree.c (need_assembler_name_p): Only record main variant type names.
+
2016-03-10 Christophe Lyon <christophe.lyon@linaro.org>
PR target/70113.
diff --git a/gcc/tree.c b/gcc/tree.c
index 7d0cb035b23..c1cfcd4ecc9 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -5329,6 +5329,7 @@ need_assembler_name_p (tree decl)
&& TREE_CODE (decl) == TYPE_DECL
&& DECL_NAME (decl)
&& decl == TYPE_NAME (TREE_TYPE (decl))
+ && TYPE_MAIN_VARIANT (TREE_TYPE (decl)) == TREE_TYPE (decl)
&& !TYPE_ARTIFICIAL (TREE_TYPE (decl))
&& (type_with_linkage_p (TREE_TYPE (decl))
|| TREE_CODE (TREE_TYPE (decl)) == INTEGER_TYPE)