This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug testsuite/64930] [5 regression] FAIL: gcc.target/powerpc/atomic-p7.c scan-assembler-times isync 12
- From: "torvald at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 12 Feb 2015 16:03:30 +0000
- Subject: [Bug testsuite/64930] [5 regression] FAIL: gcc.target/powerpc/atomic-p7.c scan-assembler-times isync 12
- Auto-submitted: auto-generated
- References: <bug-64930-4 at http dot gcc dot gnu dot 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