trans.h (caf_sync_memory): New function decl tree.
authorAlessandro Fanfarillo <fanfarillo.gcc@gmail.com>
Tue, 10 Mar 2015 17:58:01 +0000 (11:58 -0600)
committerTobias Burnus <burnus@gcc.gnu.org>
Tue, 10 Mar 2015 17:58:01 +0000 (18:58 +0100)
commit9315dff064f2ddbbc159d5afcee176cab06bfcba
tree3b81e10f4b9ef07bf487371bb8be9be05d418397
parenta4d66d7dc7a140adf8d2bfb87d4d6354abc7b340
trans.h (caf_sync_memory): New function decl tree.

2015-03-10  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
            Tobias Burnus  <burnus@net-b.de>

        * trans.h (caf_sync_memory): New function decl tree.
        * trans-decl.c (gfc_build_builtin_function_decls): Define it.
        (create_main_function): Don't call sync_synchronize and leave
        it to the CAF library.
        * trans-stmt.c (gfc_trans_stop): Ditto.
        (gfc_trans_sync): Ditto; add call library call for sync memory.

        * gfortran.dg/coarray_sync_memory.f90: New.

        * caf/libcaf.h (_gfortran_caf_sync_memory): New prototype.
        * caf/single.c (_gfortran_caf_sync_memory): Implement.
        (_gfortran_caf_sync_all, _gfortran_caf_sync_image): Add
        __asm__ __volatile___ ("":::"memory").

Co-Authored-By: Tobias Burnus <burnus@net-b.de>
From-SVN: r221329
gcc/fortran/ChangeLog
gcc/fortran/trans-decl.c
gcc/fortran/trans-stmt.c
gcc/fortran/trans.h
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/coarray_sync_memory.f90 [new file with mode: 0644]
libgfortran/ChangeLog
libgfortran/caf/libcaf.h
libgfortran/caf/single.c