This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13668] thread local storage: static class member does not work
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Nov 2005 12:18:40 -0000
- Subject: [Bug c++/13668] thread local storage: static class member does not work
- References: <bug-13668-6441@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from jakub at gcc dot gnu dot org 2005-11-08 12:18 -------
Why are you so sure it is not a GCC bug?
It clearly is a C++ frontend bug:
grep -C1 _ZN5TemplImE2_tE __thread.s __threadmain.s
__thread.s- movq -16(%rbp), %rax
__thread.s: movq %rax, _ZN5TemplImE2_tE(%rip)
__thread.s- leave
--
__thread.s- movq %rdi, -8(%rbp)
__thread.s: movq _ZN5TemplImE2_tE(%rip), %rax
__thread.s- leave
--
__thread.s- movq (%rax), %rax
__thread.s: movq $_ZN5TemplImE2_tE, (%rsp)
__thread.s- movq %rdx, %r9
--
__thread.s- movq (%rax), %rax
__thread.s: movq $_ZN5TemplImE2_tE, (%rsp)
__thread.s- movq %rdx, %r9
--
__threadmain.s- .zero 1
__threadmain.s:.globl _ZN5TemplImE2_tE
__threadmain.s- .section .tbss
__threadmain.s- .align 8
__threadmain.s: .type _ZN5TemplImE2_tE, @object
__threadmain.s: .size _ZN5TemplImE2_tE, 8
__threadmain.s:_ZN5TemplImE2_tE:
__threadmain.s- .zero 8
As you can see, _ZN5TemplImE2_tE is correctly declared as a .tbss object
in __threadmain.s, but __thread.s works with that object as if it wasn't
__thread variable.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13668