------- 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