This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Thanks for the quick response. Patch built and regtested on x86_64-unknown-linux-gnu. Currently the stub for sync memory in single.c invokes "asm volatile ("" : : : "memory")" but _gfortran_caf_sync_memory is not called when the code is compiled with -fcoarray=single. Please let me know if I have to change the patch for -fcoarray=single. 2015-03-06 11:20 GMT-08:00 Tobias Burnus <burnus@net-b.de>: > Dear Alessandro, > > Alessandro Fanfarillo wrote: > > so far a "sync memory" statement is translated into a local > "__sync_synchronize ()". > The attached draft patch delegates the action for sync memory (when > -fcoarray=lib is used) to the external function > _gfortran_caf_sync_memory() implemented in the OpenCoarrays library. > > > Looks good to me. However, you should add a test case with 'dg-options > "-fdump-tree-original -fcoarray=lib"' to check that this works; cf. > gcc/testsuite/gfortran.dg/coarray*.f90 for examples. > > And you have to provide a stub implementation in > libgfortran/caf/{libcaf.h,single.c}. > > Tobias > > PS: I wonder whether it makes sense to remove the __sync_synchronize for > -fcoarray=single and replace it by the equivalent to "asm volatile ("" : : : > "memory")". It almost certainly does.
Attachment:
patch_sync_memory.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |