Bug 114706 - libstdc++-devel contains a broken bits/atomicity.h on x86_64
libstdc++-devel contains a broken bits/atomicity.h on x86_64
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
x86_64 Linux
high Severity high
: ---
: ---
Assigned To: Richard Henderson
Depends On:
  Show dependency treegraph
Reported: 2004-01-31 19:26 EST by Bryan O'Sullivan
Modified: 2007-11-30 17:10 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-05 21:07:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Bryan O'Sullivan 2004-01-31 19:26:00 EST
Description of problem:

The atomic ops in bits/atomicity.h of libstdc++-devel on x86_64
include broken inline assembly like this:

xadd{l} {%0,%1|%1,%0}

This was also a problem on the RHEL 2.9.5 preview, but seems to have
been fixed in RHEL 3.

Version-Release number of selected component (if applicable):


How reproducible:

Any C++ code that uses atomicity.h fails to compile, for example
basic_string and the IO streams stuff.  In other words, anything that
uses STL will break.

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 Jakub Jelinek 2004-02-16 09:26:42 EST
Can you expand on why do you think this is broken assembly and what exactly
doesn't work?
It works for me just fine and there is nothing broken on it AFAICS.
Comment 2 Bryan O'Sullivan 2004-02-16 13:44:41 EST
I had an easy test case to reproduce this, but I've mislaid it.  Argh.
 Keep this open a wee bit longer, and I'll dig it up.
Comment 3 Jaakko Hyvätti 2004-05-03 10:02:57 EDT
Compile this with -O1, gives you the asm errors:

g++ -O1 -c test.cc

#include <string>
using namespace std;
void f () {
  string s;
  s += "";

I tested this on Fedora Core 2 test3 x86_64
Comment 4 Richard Henderson 2004-10-05 21:07:28 EDT
Pushed upstream to

Note You need to log in before you can comment on or make changes to this bug.