ipa-visibility.c: Include varasm.h
authorJan Hubicka <hubicka@ucw.cz>
Sun, 8 Jun 2014 16:47:57 +0000 (18:47 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sun, 8 Jun 2014 16:47:57 +0000 (16:47 +0000)
* ipa-visibility.c: Include varasm.h
(can_replace_by_local_alias): Ceck decl_binds_to_current_def_p.

From-SVN: r211356

gcc/ChangeLog
gcc/ipa-visibility.c

index d0a12531c3182f9d12f2970e5ab7450ee4f39ecc..c7767ed87c6758ac4be8f1505b74664364d80ccd 100644 (file)
@@ -1,3 +1,8 @@
+2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
+
+       * ipa-visibility.c: Include varasm.h
+       (can_replace_by_local_alias): Ceck decl_binds_to_current_def_p.
+
 2014-06-07  Jan Hubicka  <hubicka@ucw.cz>
 
        * cgraphunit.c (assemble_thunks_and_aliases): Expand thunks before
index 7886722ab8bd8c7ee51a816e1e953965377959f3..645884021a886f61243ea89e879d3daa027f4ade 100644 (file)
@@ -82,6 +82,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "pointer-set.h"
 #include "calls.h"
 #include "gimple-expr.h"
+#include "varasm.h"
 
 /* Return true when NODE can not be local. Worker for cgraph_local_node_p.  */
 
@@ -340,6 +341,7 @@ bool
 can_replace_by_local_alias (symtab_node *node)
 {
   return (symtab_node_availability (node) > AVAIL_OVERWRITABLE
+         && !decl_binds_to_current_def_p (node->decl)
          && !symtab_can_be_discarded (node));
 }