On 07/12/15 10:06, Tobias Burnus wrote:
I wrote:
I wonder whether using

__asm__ __volatile__ ("":::"memory");

would be sufficient as it has a way lower overhead than
__sync_synchronize().

Namely, something like the attached patch.

Regarding the original patch submission: Is there a reason that you didn't
include the test case of Deepak from 
https://gcc.gnu.org/ml/fortran/2015-04/msg00062.html
It should work as -fcoarray=lib -lcaf_single "dg-do run" test.

Tobias


I don't know anything about Fortran or coarrays and I'm curious whether this affects architectures with weak memory models. Is the barrier only needed to stop reordering by the compiler or is does it also need to stop reordering by the hardware?

Matthew


Reply via email to