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
This commit is contained in:
Richard Henderson 2002-05-22 22:14:02 -07:00 committed by Richard Henderson
parent a70b54fd56
commit 6f001fdf2b
4 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,8 @@
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>
* config/rs6000/aix43.h (LINK_SPEC): Add PE initializer.

View File

@ -1,3 +1,8 @@
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.

View File

@ -7581,7 +7581,7 @@ static tree
obscure_complex_init (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");
return NULL_TREE;

View File

@ -5105,7 +5105,7 @@ default_section_type_flags (decl, name, reloc)
if (decl && DECL_ONE_ONLY (decl))
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;
if (strcmp (name, ".bss") == 0