------- Comment #1 from rguenth at gcc dot gnu dot org  2010-07-04 15:00 -------
I have analyzed this already.  The problem is that

struct QMapData
{
  QBasicAtomicInt ref;
  static QMapData shared_null;
};

the static QMapData shared_null has DECL_ALIGN of 8 bits.  So we end up passing
an unaligned shared_null.ref._q_value as operand to

  __asm__ ("": "=m" (_q_value): :);

which doesn't work.

This is exposed by the mem-ref2 merge as previously we did not see the
shared_null decl (and thus its bogus alignment) here but instead referenced
via a pointer which got proper natural alignment from its type.

Thus, this is a C++ frontend bug.

CCing Jason.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu dot org
             Status|UNCONFIRMED                 |NEW
          Component|inline-asm                  |c++
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-07-04 15:00:43
               date|                            |
   Target Milestone|---                         |4.6.0


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

Reply via email to