public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13668] thread local storage: static class member does not work
       [not found] <bug-13668-6441@http.gcc.gnu.org/bugzilla/>
@ 2005-11-08 12:18 ` jakub at gcc dot gnu dot org
  2005-11-08 12:23 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-11-08 12:18 UTC (permalink / raw)
  To: gcc-bugs



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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/13668] thread local storage: static class member does not work
       [not found] <bug-13668-6441@http.gcc.gnu.org/bugzilla/>
  2005-11-08 12:18 ` [Bug c++/13668] thread local storage: static class member does not work jakub at gcc dot gnu dot org
@ 2005-11-08 12:23 ` jakub at gcc dot gnu dot org
  2005-11-08 12:51 ` simon dot marshall at misys dot com
  2005-11-08 13:02 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-11-08 12:23 UTC (permalink / raw)
  To: gcc-bugs



-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|REOPENED                    |ASSIGNED
   Last reconfirmed|0000-00-00 00:00:00         |2005-11-08 12:23:03
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13668


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/13668] thread local storage: static class member does not work
       [not found] <bug-13668-6441@http.gcc.gnu.org/bugzilla/>
  2005-11-08 12:18 ` [Bug c++/13668] thread local storage: static class member does not work jakub at gcc dot gnu dot org
  2005-11-08 12:23 ` jakub at gcc dot gnu dot org
@ 2005-11-08 12:51 ` simon dot marshall at misys dot com
  2005-11-08 13:02 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 10+ messages in thread
From: simon dot marshall at misys dot com @ 2005-11-08 12:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from simon dot marshall at misys dot com  2005-11-08 12:51 -------
FYI, I raised this error with glibc with a slightly different attachment.
http://sourceware.org/bugzilla/show_bug.cgi?id=1830 has the code Jakub refers
to.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13668


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/13668] thread local storage: static class member does not work
       [not found] <bug-13668-6441@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2005-11-08 12:51 ` simon dot marshall at misys dot com
@ 2005-11-08 13:02 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-08 13:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from pinskia at gcc dot gnu dot org  2005-11-08 13:02 -------


*** This bug has been marked as a duplicate of 19450 ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13668


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/13668] thread local storage: static class member does not work
  2004-01-13 14:51 [Bug c++/13668] New: " simon dot marshall at misys dot com
                   ` (4 preceding siblings ...)
  2004-01-21  9:47 ` simon dot marshall at misys dot com
@ 2004-01-21 13:54 ` bangerth at dealii dot org
  5 siblings, 0 replies; 10+ messages in thread
From: bangerth at dealii dot org @ 2004-01-21 13:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-01-21 13:54 -------
You may want to post to the glibc bug reporting list. 
 
W. 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13668


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/13668] thread local storage: static class member does not work
  2004-01-13 14:51 [Bug c++/13668] New: " simon dot marshall at misys dot com
                   ` (3 preceding siblings ...)
  2004-01-18 18:16 ` pinskia at gcc dot gnu dot org
@ 2004-01-21  9:47 ` simon dot marshall at misys dot com
  2004-01-21 13:54 ` bangerth at dealii dot org
  5 siblings, 0 replies; 10+ messages in thread
From: simon dot marshall at misys dot com @ 2004-01-21  9:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From simon dot marshall at misys dot com  2004-01-21 09:47 -------
(In reply to comment #4)
> This is not a gcc bug, this is a bug in glibc.

Thanks.  Do I have to do something to report it to the glibc maintainers or is 
the issue already known by them?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13668


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/13668] thread local storage: static class member does not work
  2004-01-13 14:51 [Bug c++/13668] New: " simon dot marshall at misys dot com
                   ` (2 preceding siblings ...)
  2004-01-17  1:03 ` feanor-list at tol-eressea dot org
@ 2004-01-18 18:16 ` pinskia at gcc dot gnu dot org
  2004-01-21  9:47 ` simon dot marshall at misys dot com
  2004-01-21 13:54 ` bangerth at dealii dot org
  5 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-18 18:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-18 18:16 -------
This is not a gcc bug, this is a bug in glibc.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13668


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/13668] thread local storage: static class member does not work
  2004-01-13 14:51 [Bug c++/13668] New: " simon dot marshall at misys dot com
  2004-01-13 14:54 ` [Bug c++/13668] " simon dot marshall at misys dot com
  2004-01-17  1:01 ` feanor-list at tol-eressea dot org
@ 2004-01-17  1:03 ` feanor-list at tol-eressea dot org
  2004-01-18 18:16 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: feanor-list at tol-eressea dot org @ 2004-01-17  1:03 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From feanor-list at tol-eressea dot org  2004-01-17 01:03 -------
(In reply to comment #2)
> Created an attachment (id=5506)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5506&action=view)
> Two thread, one static variable, three addresses:))
> 
> Try to compile this little program and you'll some funny behaviour.

The is the output on g++ 3.3.2 on debian:
__display value: 0x804a058, address: 0x8049c68 in thread 1085393872
__display value: (nil), address: 0x40b1cbc8 in thread 1085393872
disp (nil)
__display value: 0x804c3f8, address: 0x8049c68 in thread 1085393872
__display value: (nil), address: 0x40b1cbc8 in thread 1085393872
__display value: 0x804b090, address: 0x8049c68 in thread 1077004064
__display value: (nil), address: 0x4031c718 in thread 1077004064
disp (nil)
Erreur de segmentation


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13668


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/13668] thread local storage: static class member does not work
  2004-01-13 14:51 [Bug c++/13668] New: " simon dot marshall at misys dot com
  2004-01-13 14:54 ` [Bug c++/13668] " simon dot marshall at misys dot com
@ 2004-01-17  1:01 ` feanor-list at tol-eressea dot org
  2004-01-17  1:03 ` feanor-list at tol-eressea dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: feanor-list at tol-eressea dot org @ 2004-01-17  1:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From feanor-list at tol-eressea dot org  2004-01-17 01:01 -------
Created an attachment (id=5506)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5506&action=view)
Two thread, one static variable, three addresses:))

Try to compile this little program and you'll some funny behaviour.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13668


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/13668] thread local storage: static class member does not work
  2004-01-13 14:51 [Bug c++/13668] New: " simon dot marshall at misys dot com
@ 2004-01-13 14:54 ` simon dot marshall at misys dot com
  2004-01-17  1:01 ` feanor-list at tol-eressea dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: simon dot marshall at misys dot com @ 2004-01-13 14:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From simon dot marshall at misys dot com  2004-01-13 14:54 -------
Created an attachment (id=5473)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5473&action=view)
test case

Attached is a test case to demonstrate the bug.  The test case is described in
the bug comment.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13668


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-11-08 13:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-13668-6441@http.gcc.gnu.org/bugzilla/>
2005-11-08 12:18 ` [Bug c++/13668] thread local storage: static class member does not work jakub at gcc dot gnu dot org
2005-11-08 12:23 ` jakub at gcc dot gnu dot org
2005-11-08 12:51 ` simon dot marshall at misys dot com
2005-11-08 13:02 ` pinskia at gcc dot gnu dot org
2004-01-13 14:51 [Bug c++/13668] New: " simon dot marshall at misys dot com
2004-01-13 14:54 ` [Bug c++/13668] " simon dot marshall at misys dot com
2004-01-17  1:01 ` feanor-list at tol-eressea dot org
2004-01-17  1:03 ` feanor-list at tol-eressea dot org
2004-01-18 18:16 ` pinskia at gcc dot gnu dot org
2004-01-21  9:47 ` simon dot marshall at misys dot com
2004-01-21 13:54 ` bangerth at dealii dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).