From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18889 invoked by alias); 4 Jul 2010 15:00:55 -0000 Received: (qmail 18856 invoked by uid 48); 4 Jul 2010 15:00:43 -0000 Date: Sun, 04 Jul 2010 15:00:00 -0000 Message-ID: <20100704150043.18855.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/44810] [4.6 Regression] FAIL: g++.dg/torture/pr36745.C In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-07/txt/msg00382.txt.bz2 ------- 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