public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/42273]  New: atomic_2.h:111: = instead of == in if
@ 2009-12-04  9:29 to dot roma dot from dot bugcc at qwertty dot com
  2009-12-04  9:31 ` [Bug libstdc++/42273] " paolo dot carlini at oracle dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: to dot roma dot from dot bugcc at qwertty dot com @ 2009-12-04  9:29 UTC (permalink / raw)
  To: gcc-bugs

Is it a silly bug or a contrived way of calling __sync_synchronize regardless
of the required memory_order?

--- atomic_2.h  2009-12-04 11:23:26.000000000 +0200
+++ atomic_2.h  2009-12-04 11:23:35.000000000 +0200
@@ -108,7 +108,7 @@
        {
          // write_mem_barrier();
          _M_i = __v;
-         if (__m = memory_order_seq_cst)
+         if (__m == memory_order_seq_cst)
            __sync_synchronize();
        }
     }


-- 
           Summary: atomic_2.h:111: = instead of == in if
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: to dot roma dot from dot bugcc at qwertty dot com


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


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

* [Bug libstdc++/42273] atomic_2.h:111: = instead of == in if
  2009-12-04  9:29 [Bug libstdc++/42273] New: atomic_2.h:111: = instead of == in if to dot roma dot from dot bugcc at qwertty dot com
@ 2009-12-04  9:31 ` paolo dot carlini at oracle dot com
  2009-12-04 10:54 ` redi at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-12-04  9:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from paolo dot carlini at oracle dot com  2009-12-04 09:31 -------
Benjamin, can you check this?


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bkoz at redhat dot com


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


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

* [Bug libstdc++/42273] atomic_2.h:111: = instead of == in if
  2009-12-04  9:29 [Bug libstdc++/42273] New: atomic_2.h:111: = instead of == in if to dot roma dot from dot bugcc at qwertty dot com
  2009-12-04  9:31 ` [Bug libstdc++/42273] " paolo dot carlini at oracle dot com
@ 2009-12-04 10:54 ` redi at gcc dot gnu dot org
  2009-12-04 11:00 ` redi at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu dot org @ 2009-12-04 10:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from redi at gcc dot gnu dot org  2009-12-04 10:54 -------
the suggested change is correct


-- 


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


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

* [Bug libstdc++/42273] atomic_2.h:111: = instead of == in if
  2009-12-04  9:29 [Bug libstdc++/42273] New: atomic_2.h:111: = instead of == in if to dot roma dot from dot bugcc at qwertty dot com
  2009-12-04  9:31 ` [Bug libstdc++/42273] " paolo dot carlini at oracle dot com
  2009-12-04 10:54 ` redi at gcc dot gnu dot org
@ 2009-12-04 11:00 ` redi at gcc dot gnu dot org
  2009-12-04 18:43 ` bkoz at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu dot org @ 2009-12-04 11:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from redi at gcc dot gnu dot org  2009-12-04 11:00 -------
Although as I noted in Bug 40297 comment 2 I think that function should also
have a memory barrier when m == memory_order_release, which the current code
has "by accident" because of this bug ... so arguably it's better that way!


-- 


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


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

* [Bug libstdc++/42273] atomic_2.h:111: = instead of == in if
  2009-12-04  9:29 [Bug libstdc++/42273] New: atomic_2.h:111: = instead of == in if to dot roma dot from dot bugcc at qwertty dot com
                   ` (2 preceding siblings ...)
  2009-12-04 11:00 ` redi at gcc dot gnu dot org
@ 2009-12-04 18:43 ` bkoz at gcc dot gnu dot org
  2009-12-04 18:46 ` redi at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2009-12-04 18:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from bkoz at gcc dot gnu dot org  2009-12-04 18:43 -------

Agree with #2. This is a one-liner to fix.

Jonathan, can you put your comments in 40297 into the wiki page for atomics?
I'd forgotten about this whole commentary. We are just starting in again on
this.

See:
http://gcc.gnu.org/wiki/Atomic

best,
benjamin


-- 


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


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

* [Bug libstdc++/42273] atomic_2.h:111: = instead of == in if
  2009-12-04  9:29 [Bug libstdc++/42273] New: atomic_2.h:111: = instead of == in if to dot roma dot from dot bugcc at qwertty dot com
                   ` (3 preceding siblings ...)
  2009-12-04 18:43 ` bkoz at gcc dot gnu dot org
@ 2009-12-04 18:46 ` redi at gcc dot gnu dot org
  2009-12-09 21:22 ` bkoz at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu dot org @ 2009-12-04 18:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from redi at gcc dot gnu dot org  2009-12-04 18:46 -------
will do


-- 

redi at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |redi at gcc dot gnu dot org


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


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

* [Bug libstdc++/42273] atomic_2.h:111: = instead of == in if
  2009-12-04  9:29 [Bug libstdc++/42273] New: atomic_2.h:111: = instead of == in if to dot roma dot from dot bugcc at qwertty dot com
                   ` (4 preceding siblings ...)
  2009-12-04 18:46 ` redi at gcc dot gnu dot org
@ 2009-12-09 21:22 ` bkoz at gcc dot gnu dot org
  2009-12-09 22:07 ` bkoz at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2009-12-09 21:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from bkoz at gcc dot gnu dot org  2009-12-09 21:22 -------
Mine. Adjusting for 4.4. branch.


-- 

bkoz at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |bkoz at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-12-09 21:22:20
               date|                            |
   Target Milestone|---                         |4.4.3
            Version|4.5.0                       |4.4.0


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


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

* [Bug libstdc++/42273] atomic_2.h:111: = instead of == in if
  2009-12-04  9:29 [Bug libstdc++/42273] New: atomic_2.h:111: = instead of == in if to dot roma dot from dot bugcc at qwertty dot com
                   ` (5 preceding siblings ...)
  2009-12-09 21:22 ` bkoz at gcc dot gnu dot org
@ 2009-12-09 22:07 ` bkoz at gcc dot gnu dot org
  2009-12-09 22:39 ` bkoz at gcc dot gnu dot org
  2009-12-15 21:46 ` bkoz at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2009-12-09 22:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from bkoz at gcc dot gnu dot org  2009-12-09 22:07 -------
Subject: Bug 42273

Author: bkoz
Date: Wed Dec  9 22:06:59 2009
New Revision: 155117

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155117
Log:
2009-12-09  Roman Odaisky  <to.roma.from.bugcc@qwertty.com>

        PR libstdc++/42273
        * include/bits/atomic_2.h: Fix typo.


Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/atomic_2.h


-- 


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


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

* [Bug libstdc++/42273] atomic_2.h:111: = instead of == in if
  2009-12-04  9:29 [Bug libstdc++/42273] New: atomic_2.h:111: = instead of == in if to dot roma dot from dot bugcc at qwertty dot com
                   ` (6 preceding siblings ...)
  2009-12-09 22:07 ` bkoz at gcc dot gnu dot org
@ 2009-12-09 22:39 ` bkoz at gcc dot gnu dot org
  2009-12-15 21:46 ` bkoz at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2009-12-09 22:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from bkoz at gcc dot gnu dot org  2009-12-09 22:39 -------
Subject: Bug 42273

Author: bkoz
Date: Wed Dec  9 22:38:57 2009
New Revision: 155118

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155118
Log:
2009-12-09  Roman Odaisky  <to.roma.from.bugcc@qwertty.com>

        PR libstdc++/42273
        * include/bits/atomic_2.h: Fix typo.


Modified:
    branches/gcc-4_4-branch/libstdc++-v3/ChangeLog
    branches/gcc-4_4-branch/libstdc++-v3/include/bits/atomic_2.h


-- 


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


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

* [Bug libstdc++/42273] atomic_2.h:111: = instead of == in if
  2009-12-04  9:29 [Bug libstdc++/42273] New: atomic_2.h:111: = instead of == in if to dot roma dot from dot bugcc at qwertty dot com
                   ` (7 preceding siblings ...)
  2009-12-09 22:39 ` bkoz at gcc dot gnu dot org
@ 2009-12-15 21:46 ` bkoz at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2009-12-15 21:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from bkoz at gcc dot gnu dot org  2009-12-15 21:46 -------
Fixed.


-- 

bkoz at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2009-12-15 21:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-04  9:29 [Bug libstdc++/42273] New: atomic_2.h:111: = instead of == in if to dot roma dot from dot bugcc at qwertty dot com
2009-12-04  9:31 ` [Bug libstdc++/42273] " paolo dot carlini at oracle dot com
2009-12-04 10:54 ` redi at gcc dot gnu dot org
2009-12-04 11:00 ` redi at gcc dot gnu dot org
2009-12-04 18:43 ` bkoz at gcc dot gnu dot org
2009-12-04 18:46 ` redi at gcc dot gnu dot org
2009-12-09 21:22 ` bkoz at gcc dot gnu dot org
2009-12-09 22:07 ` bkoz at gcc dot gnu dot org
2009-12-09 22:39 ` bkoz at gcc dot gnu dot org
2009-12-15 21:46 ` bkoz at gcc dot gnu 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).