Bug 114706

Summary: libstdc++-devel contains a broken bits/atomicity.h on x86_64
Product: [Fedora] Fedora Reporter: Bryan O'Sullivan <bos>
Component: gccAssignee: Richard Henderson <rth>
Status: CLOSED UPSTREAM QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 1CC: 64bit_fedora, gczarcinski, jaakko.hyvatti
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-06 01:07:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bryan O'Sullivan 2004-02-01 00:26:00 UTC
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):

libstdc++-devel-3.3.2-1

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:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Jakub Jelinek 2004-02-16 14:26:42 UTC
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 18:44:41 UTC
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 14:02:57 UTC
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-06 01:07:28 UTC
Pushed upstream to
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17856