before using DECL_THREAD_LOCAL.
* decl.c (obscure_complex_init): Check for VAR_DECL
before using DECL_THREAD_LOCAL.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53761
138bc75d-0d04-0410-961f-
82ee72b054a4
+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.
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.
(obscure_complex_init): Reject run-time init of tls.
(grokvardecl, grokdeclarator): Handle RID_THREAD.
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;
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