Re: atomic_thread_fence() semantics

2017-10-19 Thread Mattias Rönnblom
On 2017-10-19 14:31, Alexander Monakov wrote: On Thu, 19 Oct 2017, Andrew Haley wrote: On 19/10/17 12:58, Mattias Rönnblom wrote: Did I misunderstand the semantics of atomic_thread_fence+memory_order_release? No, you did not. This looks like a bug. Please report it. This bug is fixed on

atomic_thread_fence() semantics

2017-10-19 Thread Mattias Rönnblom
Hi. I have this code: #include int ready; int message; void send_x4711(int m) { message = m*4711; atomic_thread_fence(memory_order_release); ready = 1; } When I compile it with GCC 7.2 -O3 -std=c11 on x86_64 it produces the following code: send_x4711: .LFB0: .LVL0: imu