tree.c (need_assembler_name_p): Store C++ type mangling only for aggregates.
authorJan Hubicka <hubicka@ucw.cz>
Sat, 13 Sep 2014 16:12:20 +0000 (18:12 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 13 Sep 2014 16:12:20 +0000 (16:12 +0000)
* tree.c (need_assembler_name_p): Store C++ type mangling only
for aggregates.

From-SVN: r215238

gcc/ChangeLog
gcc/tree.c

index ba99610df884aaf4d09e876bed7aaa00b7fb4aea..0a329285e7e921dcd1a46de2b70a1881f8a4695b 100644 (file)
@@ -1,3 +1,8 @@
+2014-09-13  Jan Hubicka  <hubicka@ucw.cz>
+
+       * tree.c (need_assembler_name_p): Store C++ type mangling only
+       for aggregates.
+
 2014-09-13  Marek Polacek  <polacek@redhat.com>
 
        * tree.c (protected_set_expr_location): Don't check whether T is
index f999a3bbdbed56a7b041bd32b25db2f2849b5032..87a222fde30d75b78f62ca85b27c31b2a723c35a 100644 (file)
@@ -5002,6 +5002,7 @@ need_assembler_name_p (tree decl)
       && DECL_NAME (decl)
       && decl == TYPE_NAME (TREE_TYPE (decl))
       && !is_lang_specific (TREE_TYPE (decl))
+      && AGGREGATE_TYPE_P (TREE_TYPE (decl))
       && !type_in_anonymous_namespace_p (TREE_TYPE (decl)))
     return !DECL_ASSEMBLER_NAME_SET_P (decl);
   /* Only FUNCTION_DECLs and VAR_DECLs are considered.  */