OSDN Git Service

2010-05-21 Kai Tietz <kai.tietz@onevision.com>
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 May 2010 11:25:23 +0000 (11:25 +0000)
committerktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 May 2010 11:25:23 +0000 (11:25 +0000)
        PR/44139
        * varasm.c (emutls_decl): Merge attributes to new decl.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159658 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/varasm.c

index ac091e5..276c80c 100644 (file)
@@ -1,3 +1,8 @@
+2010-05-21  Kai Tietz  <kai.tietz@onevision.com>
+
+       PR/44139
+       * varasm.c (emutls_decl): Merge attributes to new decl.
+
 2010-05-21  Eric Botcazou  <ebotcazou@adacore.com>
 
        PR middle-end/44101
index 5fb57dc..701847c 100644 (file)
@@ -403,6 +403,8 @@ emutls_decl (tree decl)
        int foo() { return i; }
        __thread int i = 1;
      in which I goes from external to locally defined and initialized.  */
+  DECL_DLLIMPORT_P (to) = DECL_DLLIMPORT_P (decl);
+  DECL_ATTRIBUTES (to) = targetm.merge_decl_attributes (decl, to);
 
   TREE_STATIC (to) = TREE_STATIC (decl);
   TREE_USED (to) = TREE_USED (decl);