Commit 6f001fdf by Richard Henderson Committed by Richard Henderson

varasm.c (default_section_type_flags): Check for VAR_DECL before using DECL_THREAD_LOCAL.

        * varasm.c (default_section_type_flags): Check for VAR_DECL
        before using DECL_THREAD_LOCAL.

        * decl.c (obscure_complex_init): Check for VAR_DECL
        before using DECL_THREAD_LOCAL.

From-SVN: r53761
parent a70b54fd
2002-05-22 Richard Henderson <rth@redhat.com>
* varasm.c (default_section_type_flags): Check for VAR_DECL
before using DECL_THREAD_LOCAL.
2002-05-22 David Edelsohn <edelsohn@gnu.org> 2002-05-22 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/aix43.h (LINK_SPEC): Add PE initializer. * config/rs6000/aix43.h (LINK_SPEC): Add PE initializer.
......
2002-05-22 Richard Henderson <rth@redhat.com> 2002-05-22 Richard Henderson <rth@redhat.com>
* decl.c (obscure_complex_init): Check for VAR_DECL
before using DECL_THREAD_LOCAL.
2002-05-22 Richard Henderson <rth@redhat.com>
* decl.c (check_tag_decl): Handle RID_THREAD. * decl.c (check_tag_decl): Handle RID_THREAD.
(obscure_complex_init): Reject run-time init of tls. (obscure_complex_init): Reject run-time init of tls.
(grokvardecl, grokdeclarator): Handle RID_THREAD. (grokvardecl, grokdeclarator): Handle RID_THREAD.
......
...@@ -7581,7 +7581,7 @@ static tree ...@@ -7581,7 +7581,7 @@ static tree
obscure_complex_init (decl, init) obscure_complex_init (decl, init)
tree decl, init; tree decl, init;
{ {
if (DECL_THREAD_LOCAL (decl)) if (TREE_CODE (decl) == VAR_DECL && DECL_THREAD_LOCAL (decl))
{ {
error ("run-time initialization of thread-local storage"); error ("run-time initialization of thread-local storage");
return NULL_TREE; return NULL_TREE;
......
...@@ -5105,7 +5105,7 @@ default_section_type_flags (decl, name, reloc) ...@@ -5105,7 +5105,7 @@ default_section_type_flags (decl, name, reloc)
if (decl && DECL_ONE_ONLY (decl)) if (decl && DECL_ONE_ONLY (decl))
flags |= SECTION_LINKONCE; flags |= SECTION_LINKONCE;
if (decl && DECL_THREAD_LOCAL (decl)) if (decl && TREE_CODE (decl) == VAR_DECL && DECL_THREAD_LOCAL (decl))
flags |= SECTION_TLS | SECTION_WRITE; flags |= SECTION_TLS | SECTION_WRITE;
if (strcmp (name, ".bss") == 0 if (strcmp (name, ".bss") == 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment