This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/55947] non constant memory models lose HLE qualifiers
- From: "andi-gcc at firstfloor dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 13 Mar 2013 13:49:10 +0000
- Subject: [Bug target/55947] non constant memory models lose HLE qualifiers
- Auto-submitted: auto-generated
- References: <bug-55947-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55947
--- Comment #3 from Andi Kleen <andi-gcc at firstfloor dot org> 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);
}