aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2004-11-24 16:37:02 +0000
committerAldy Hernandez <aldyh@gcc.gnu.org>2004-11-24 16:37:02 +0000
commit4033a1f238593d85ca3bef569214ffcbd51b26ec (patch)
tree6fe3199ef3320bb14c0b7aecd17114216aefd972 /gcc/tree.c
parent39123624ff2ab0c737d88382b350937a2ed9bc24 (diff)
downloadgcc-4033a1f238593d85ca3bef569214ffcbd51b26ec.zip
gcc-4033a1f238593d85ca3bef569214ffcbd51b26ec.tar.gz
gcc-4033a1f238593d85ca3bef569214ffcbd51b26ec.tar.bz2
tree.c (recompute_tree_invarant_for_addr_expr): The address of a thread-local variable is invariant.
* tree.c (recompute_tree_invarant_for_addr_expr): The address of a thread-local variable is invariant. From-SVN: r91174
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 643f1de..9fb3628 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -2421,7 +2421,9 @@ do { tree _node = (NODE); \
{
if (staticp (node))
;
- else if (decl_function_context (node) == current_function_decl)
+ else if (decl_function_context (node) == current_function_decl
+ /* Addresses of thread-local variables are invariant. */
+ || (TREE_CODE (node) == VAR_DECL && DECL_THREAD_LOCAL (node)))
tc = false;
else
ti = tc = false;