Your patch fixes the issues. In attachment patch, test case and changelog. Thanks! 2015-12-07 11:06 GMT+01:00 Tobias Burnus : > 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