From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19755 invoked by alias); 12 Feb 2015 16:03:39 -0000 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 Received: (qmail 19539 invoked by uid 48); 12 Feb 2015 16:03:31 -0000 From: "torvald at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug testsuite/64930] [5 regression] FAIL: gcc.target/powerpc/atomic-p7.c scan-assembler-times isync 12 Date: Thu, 12 Feb 2015 16:03:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: testsuite X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: torvald at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-02/txt/msg01377.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64930 --- Comment #12 from torvald at gcc dot gnu.org --- (In reply to Alan Modra from comment #9) > My point was that if you write a testcase that specifically tests for > consume and get acquire code then that is a fail. The code generated is > using a bigger hammer than necessary. The consensus in ISO C++ SG1 (though we had no straw poll on this particular thing, so this is my conclusion from the discussions and the opinions voiced by other compiler vendors) is that implementing C/C++ memory_order_consume means, in practice, promoting to memory_order_acquire. This is not a GCC-specific solution or deficiency. It is rather the realization that the standard's intent can't be implemented in practice without too much costs elsewhere (e.g., because of how tracking dependencies properly would require points-to analysis or conservatively adding barriers in likely many places in the code). See this paper for more background: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4321.pdf