Bug 17856 - [3.3 only] assembly error in atomicity.h
Summary: [3.3 only] assembly error in atomicity.h
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 3.3.5
: P2 normal
Target Milestone: 3.3.6
Assignee: Richard Henderson
Keywords: patch
Depends on:
Reported: 2004-10-06 01:05 UTC by Richard Henderson
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Target: x86_64-linux
Known to work:
Known to fail:
Last reconfirmed:

proposed patch (669 bytes, patch)
2004-10-06 01:09 UTC, Richard Henderson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Henderson 2004-10-06 01:05:10 UTC
#include <string>
using namespace std;
void f () {
  string s;
  s += "";

Compiled with -O1, this will generate

/.../bits/atomicity.h:40: error: inconsistent operand constraints in an `asm'
Comment 1 Richard Henderson 2004-10-06 01:09:38 UTC
Created attachment 7290 [details]
proposed patch
Comment 2 Andrew Pinski 2004-10-06 01:14:13 UTC
Fixed for 3.4.0 and 4.0.0 by:
2003-12-19  Jason Merrill  <jason@redhat.com>

        * config/cpu/cris/atomicity.h: Remove memory clobbers.
        * config/cpu/mips/atomicity.h: Likewise.
        * config/cpu/i486/atomicity.h: Remove memory clobbers.
        Split up read-write memory operand.
        * config/cpu/m68k/atomicity.h: Likewise.
        * config/cpu/powerpc/atomicity.h: Make memory I/O explicit.
        * config/cpu/s390/atomicity.h: Likewise.
        * config/cpu/sparc/atomicity.h: Likewise.
Comment 3 Benjamin Kosnik 2004-10-07 03:32:07 UTC
I thought this looked familiar.....

I think this patch looks fine (backport of 3.4.x). I can't imagine Gaby not
going for this for the next 3.3.x release.

Comment 4 Richard Henderson 2004-12-04 00:09:25 UTC