[Bug target/55947] non constant memory models lose HLE qualifiers
andi-gcc at firstfloor dot org
gcc-bugzilla@gcc.gnu.org
Wed Mar 13 13:50:00 GMT 2013
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);
}
More information about the Gcc-bugs
mailing list