From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23471 invoked by alias); 13 Mar 2013 13:50:00 -0000 Received: (qmail 23262 invoked by uid 48); 13 Mar 2013 13:49:12 -0000 From: "andi-gcc at firstfloor dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/55947] non constant memory models lose HLE qualifiers Date: Wed, 13 Mar 2013 13:50:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: andi-gcc at firstfloor dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2013-03/txt/msg01040.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55947 --- Comment #3 from Andi Kleen 2013-03-13 13:49:10 UTC --- It was pointed out to me that atomic triggers this with, when compiled with no optimization. For HLE wrong hints would be generated. bool test_and_set(memory_order __m = memory_order_seq_cst) noexcept { return __atomic_test_and_set (&_M_i, __m); } bool foo(std::atomic_flag fl) { return fl.test_and_set(std::memory_order_relaxed); }