* lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 7 Sep 2010 15:51:52 +0000 (15:51 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 7 Sep 2010 15:51:52 +0000 (15:51 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163957 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/lto/ChangeLog
gcc/lto/lto.c

index cd05044..1966ea8 100644 (file)
@@ -1,3 +1,7 @@
+2010-09-07  Jan Hubicka  <jh@suse.cz>
+
+       * lto.c (promote_var, promote_fn): Set DECL_VISIBILITY_SPECIFIED.
+
 2010-09-03  Richard Guenther  <rguenther@suse.de>
 
        * lto-elf.c (validate_file): Always error if validation fails.
index 0b885a7..5d531f5 100644 (file)
@@ -914,6 +914,7 @@ promote_var (struct varpool_node *vnode)
   gcc_assert (flag_wpa);
   TREE_PUBLIC (vnode->decl) = 1;
   DECL_VISIBILITY (vnode->decl) = VISIBILITY_HIDDEN;
+  DECL_VISIBILITY_SPECIFIED (vnode->decl) = true;
   if (cgraph_dump_file)
     fprintf (cgraph_dump_file,
            "Promoting var as hidden: %s\n", varpool_node_name (vnode));
@@ -930,6 +931,7 @@ promote_fn (struct cgraph_node *node)
     return false;
   TREE_PUBLIC (node->decl) = 1;
   DECL_VISIBILITY (node->decl) = VISIBILITY_HIDDEN;
+  DECL_VISIBILITY_SPECIFIED (node->decl) = true;
   if (node->same_body)
     {
       struct cgraph_node *alias;
@@ -938,6 +940,7 @@ promote_fn (struct cgraph_node *node)
        {
          TREE_PUBLIC (alias->decl) = 1;
          DECL_VISIBILITY (alias->decl) = VISIBILITY_HIDDEN;
+         DECL_VISIBILITY_SPECIFIED (alias->decl) = true;
        }
     }
   if (cgraph_dump_file)