public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "torvald at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-64930-4-r6xLVeNsRu@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-64930-4@http.gcc.gnu.org/bugzilla/>

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


      parent reply	other threads:[~2015-02-12 16:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-03 23:08 [Bug target/64930] New: [5.0 " schwab@linux-m68k.org
2015-02-09  0:07 ` [Bug target/64930] [5 " pinskia at gcc dot gnu.org
2015-02-09 14:28 ` rguenth at gcc dot gnu.org
2015-02-11 17:32 ` jakub at gcc dot gnu.org
2015-02-11 17:44 ` [Bug testsuite/64930] " jakub at gcc dot gnu.org
2015-02-11 18:14 ` jgreenhalgh at gcc dot gnu.org
2015-02-11 20:20 ` torvald at gcc dot gnu.org
2015-02-11 22:49 ` jakub at gcc dot gnu.org
2015-02-11 22:57 ` amodra at gmail dot com
2015-02-11 23:02 ` jakub at gcc dot gnu.org
2015-02-12  0:31 ` amodra at gmail dot com
2015-02-12 13:15 ` jakub at gcc dot gnu.org
2015-02-12 13:15 ` jakub at gcc dot gnu.org
2015-02-12 16:03 ` torvald at gcc dot gnu.org [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-64930-4-r6xLVeNsRu@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).