OSDN Git Service

2011-12-02 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 2 Dec 2011 15:49:37 +0000 (15:49 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 2 Dec 2011 15:49:37 +0000 (15:49 +0000)
PR lto/47259
* ipa.c (varpool_externally_visible_p): Register variables
are always externally visible.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181927 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/ipa.c

index 7083bde..3865341 100644 (file)
@@ -1,3 +1,9 @@
+2011-12-02  Richard Guenther  <rguenther@suse.de>
+
+       PR lto/47259
+       * ipa.c (varpool_externally_visible_p): Register variables
+       are always externally visible.
+
 2011-12-02  Sameera Deshpande  <sameera.deshpande@arm.com>
 
        * gimple-pretty-print.c (dump_gimple_call): Dereference fn only if
 2011-12-02  Sameera Deshpande  <sameera.deshpande@arm.com>
 
        * gimple-pretty-print.c (dump_gimple_call): Dereference fn only if
index 2f79846..388291a 100644 (file)
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -662,6 +662,8 @@ varpool_externally_visible_p (struct varpool_node *vnode, bool aliased)
   if (varpool_used_from_object_file_p (vnode))
     return true;
 
   if (varpool_used_from_object_file_p (vnode))
     return true;
 
+  if (DECL_HARD_REGISTER (vnode->decl))
+    return true;
   if (DECL_PRESERVE_P (vnode->decl))
     return true;
   if (lookup_attribute ("externally_visible",
   if (DECL_PRESERVE_P (vnode->decl))
     return true;
   if (lookup_attribute ("externally_visible",