diff options
author | Daniel Carrera <dcarrera@gmail.com> | 2011-06-10 12:22:24 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2011-06-10 12:22:24 +0200 |
commit | f5c01f5bde72d697dc28a9d9e31e9dfa2209f081 (patch) | |
tree | 4d1a49e6b55f66c96e0bf26e86bf290b7017072c /gcc/testsuite/gfortran.dg | |
parent | fede8efad0bfa82997fd1ff49f84eb493231ca23 (diff) | |
download | gcc-f5c01f5bde72d697dc28a9d9e31e9dfa2209f081.zip gcc-f5c01f5bde72d697dc28a9d9e31e9dfa2209f081.tar.gz gcc-f5c01f5bde72d697dc28a9d9e31e9dfa2209f081.tar.bz2 |
trans-decl.c (gfc_build_builtin_function_decls): Updated declaration of caf_sync_all and caf_sync_images.
gcc/fortran/
2011-06-10 Daniel Carrera <dcarrera@gmail.com>
* trans-decl.c (gfc_build_builtin_function_decls):
Updated declaration of caf_sync_all and caf_sync_images.
* trans-stmt.c (gfc_trans_sync): Function
can now handle a "stat" variable that has an integer type
different from integer_type_node.
libgfortran/
2011-06-10 Daniel Carrera <dcarrera@gmail.com>
* caf/mpi.c (_gfortran_caf_sync_all,
_gfortran_caf_sync_images): Functions have void return type
and move status into parameter list.
* caf/single.c (_gfortran_caf_sync_all,
_gfortran_caf_sync_images): Functions have void return type
and move status into parameter list.
* caf/libcaf.h (_gfortran_caf_sync_all,
_gfortran_caf_sync_images): Functions have void return type
and move status into parameter list.
gcc/testsuite/
2011-06-10 Daniel Carrera <dcarrera@gmail.com>
* gfortran.dg/coarray/sync_1.f90: New test for
"SYNC ALL", "SYNC MEMORY" and "SYNC IMAGES".
From-SVN: r174896
Diffstat (limited to 'gcc/testsuite/gfortran.dg')
-rw-r--r-- | gcc/testsuite/gfortran.dg/coarray/sync_1.f90 | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/coarray/sync_1.f90 b/gcc/testsuite/gfortran.dg/coarray/sync_1.f90 new file mode 100644 index 0000000..7c084e0 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/coarray/sync_1.f90 @@ -0,0 +1,64 @@ +! { dg-do run } +! +! Coarray support +! PR fortran/18918 + +implicit none +integer :: n +character(len=30) :: str +critical +end critical +myCr: critical +end critical myCr + +! +! Test SYNC ALL +! +sync all +sync all ( ) +sync all (errmsg=str) + +n = 5 +sync all (stat=n) +if (n /= 0) call abort() + +n = 5 +sync all (stat=n,errmsg=str) +if (n /= 0) call abort() + + +! +! Test SYNC MEMORY +! +sync memory +sync memory ( ) +sync memory (errmsg=str) + +n = 5 +sync memory (stat=n) +if (n /= 0) call abort() + +n = 5 +sync memory (errmsg=str,stat=n) +if (n /= 0) call abort() + + +! +! Test SYNC IMAGES +! +sync images (*) +if (this_image() == 1) then + sync images (1) + sync images (1, errmsg=str) + sync images ([1]) +end if + +n = 5 +sync images (*, stat=n) +if (n /= 0) call abort() + +n = 5 +sync images (*,errmsg=str,stat=n) +if (n /= 0) call abort() + +end |