diff options
author | Tobias Burnus <burnus@gcc.gnu.org> | 2015-01-02 18:42:52 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2015-01-02 18:42:52 +0100 |
commit | 09de7c25785ff59931aee011b79a67e209db27bb (patch) | |
tree | c343efaeaf68d7d672806ad72bfa945ce5a90841 /gcc | |
parent | 6e4d8cb651033fc7c0c6815686211f5f5d94881a (diff) | |
download | gcc-09de7c25785ff59931aee011b79a67e209db27bb.zip gcc-09de7c25785ff59931aee011b79a67e209db27bb.tar.gz gcc-09de7c25785ff59931aee011b79a67e209db27bb.tar.bz2 |
single.c (_gfortran_caf_co_reduce): New function.
2015-01-02 Tobias Burnus <burnus@net-b.de>
* caf/single.c (_gfortran_caf_co_reduce): New function.
* caf/libcaf.h (_gfortran_caf_co_reduce): New prototype.
2015-01-02 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/coarray/collectives_4.f90: New.
From-SVN: r219148
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/coarray/collectives_4.f90 | 24 |
3 files changed, 30 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 9c88eb8..9e54b6f 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -14,7 +14,7 @@ * interface.c (is_procptr_result): New function to check if an expression is a procedure-pointer result. (compare_actual_formal): Use it. - +^L Copyright (C) 2015 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5fc092e..a47a1a1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-01-02 Tobias Burnus <burnus@net-b.de> + + * gfortran.dg/coarray/collectives_4.f90: New. + 2015-01-02 Janus Weil <janus@gcc.gnu.org> PR fortran/57562 @@ -18,7 +22,7 @@ PR fortran/60507 * gfortran.dg/dummy_procedure_11.f90: New. - +^L Copyright (C) 2015 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, diff --git a/gcc/testsuite/gfortran.dg/coarray/collectives_4.f90 b/gcc/testsuite/gfortran.dg/coarray/collectives_4.f90 new file mode 100644 index 0000000..6e7be46 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/coarray/collectives_4.f90 @@ -0,0 +1,24 @@ +! { dg-do run } +! +! CO_REDUCE +! +implicit none (type, external) +intrinsic :: co_reduce +integer :: stat +integer :: i4, i4_2, i + +i4 = 21 * this_image() +i4_2 = 21 +do i = 2, num_images() + i4_2 = i4_2 * 21 * i +end do +call co_reduce(i4, op_i4, stat=stat) +if (stat /= 0) call abort() +if (i4_2 /= i4) call abort() + +contains + pure integer function op_i4(a,b) + integer, value :: a, b + op_i4 = a * b + end function op_i4 +end |