]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR lto/47259 (LTO and global register variable)
authorRichard Guenther <rguenther@suse.de>
Fri, 2 Dec 2011 15:49:37 +0000 (15:49 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 2 Dec 2011 15:49:37 +0000 (15:49 +0000)
2011-12-02  Richard Guenther  <rguenther@suse.de>

PR lto/47259
* ipa.c (varpool_externally_visible_p): Register variables
are always externally visible.

From-SVN: r181927

gcc/ChangeLog
gcc/ipa.c

index 7083bdee791160c7633f7cffa85b81a753a64d4b..3865341fc245b5c5bc9637f66cbce585cadefed5 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
index 2f798460c4a6ec1b7bfa5e78a0dc51f840721447..388291a3d9230ecd643dd119b46395d8665f7f16 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 (DECL_HARD_REGISTER (vnode->decl))
+    return true;
   if (DECL_PRESERVE_P (vnode->decl))
     return true;
   if (lookup_attribute ("externally_visible",