diff options
author | Tobias Burnus <burnus@net-b.de> | 2014-09-25 08:07:15 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2014-09-25 08:07:15 +0200 |
commit | a16ee37946f575365bb39d238863422465902054 (patch) | |
tree | ea6982429800a36515244a6e806f388dff9ccc3b /libgfortran | |
parent | 2bde8cac3724cd02c8114275f5c4688f25558859 (diff) | |
download | gcc-a16ee37946f575365bb39d238863422465902054.tar.gz |
check.c (check_co_collective): Renamed from
2014-09-25 Tobias Burnus <burnus@net-b.de>
gcc/fortran
* check.c (check_co_collective): Renamed from
* check_co_minmaxsum,
handle co_reduce.
(gfc_check_co_minmax, gfc_check_co_sum): Update call.
(gfc_check_co_broadcast, gfc_check_co_reduce): New.
* gfortran.h (gfc_isym_id): Add GFC_ISYM_CO_BROADCAST and
GFC_ISYM_CO_REDUCE.
* intrinsic.c (add_subroutines): Add co_reduce and co_broadcast.
* intrinsic.h (gfc_check_co_broadcast, gfc_check_co_reduce): Add
proto types.
* intrinsic.texi (CO_BROADCAST): Add.
* trans.h (gfor_fndecl_co_broadcast): New.
* trans-decl.c (gfor_fndecl_co_broadcast): Ditto.
(gfc_build_builtin_function_decls): Add decl for it,
* trans-intrinsic.c (conv_co_collective): Renamed from
conv_co_minmaxsum. Handle co_reduce.
(gfc_conv_intrinsic_subroutine): Handle co_reduce.
gcc/testsuite/
* gfortran.dg/coarray/collectives_3.f90: New.
* gfortran.dg/coarray_collectives_9.f90: New.
* gfortran.dg/coarray_collectives_10.f90: New.
* gfortran.dg/coarray_collectives_11.f90: New.
* gfortran.dg/coarray_collectives_12.f90: New.
libgfortran/
* caf/libcaf.h (_gfortran_caf_co_broadcast): New prototype.
* caf/single.c (_gfortran_caf_co_broadcast): New.
From-SVN: r215579
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 5 | ||||
-rw-r--r-- | libgfortran/caf/libcaf.h | 10 | ||||
-rw-r--r-- | libgfortran/caf/single.c | 14 |
3 files changed, 21 insertions, 8 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index e27c2a7f7c1..71c15a962f6 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,8 @@ +2014-09-25 Tobias Burnus <burnus@net-b.de> + + * caf/libcaf.h (_gfortran_caf_co_broadcast): New prototype. + * caf/single.c (_gfortran_caf_co_broadcast): New. + 2014-09-18 Janne Blomqvist <jb@gcc.gnu.org> PR libfortran/62768 diff --git a/libgfortran/caf/libcaf.h b/libgfortran/caf/libcaf.h index 0f3398ac632..ffd0980bf67 100644 --- a/libgfortran/caf/libcaf.h +++ b/libgfortran/caf/libcaf.h @@ -106,12 +106,10 @@ void _gfortran_caf_error_stop_str (const char *, int32_t) __attribute__ ((noreturn)); void _gfortran_caf_error_stop (int32_t) __attribute__ ((noreturn)); -void _gfortran_caf_co_sum (gfc_descriptor_t *, int, int *, - char *, int); -void _gfortran_caf_co_min (gfc_descriptor_t *, int, int *, char *, - int, int); -void _gfortran_caf_co_max (gfc_descriptor_t *, int, int *, char *, - int, int); +void _gfortran_caf_co_broadcast (gfc_descriptor_t *, int, int *, char *, int); +void _gfortran_caf_co_sum (gfc_descriptor_t *, int, int *, char *, int); +void _gfortran_caf_co_min (gfc_descriptor_t *, int, int *, char *, int, int); +void _gfortran_caf_co_max (gfc_descriptor_t *, int, int *, char *, int, int); void _gfortran_caf_get (caf_token_t, size_t, int, gfc_descriptor_t *, caf_vector_t *, gfc_descriptor_t *, int, int, bool); diff --git a/libgfortran/caf/single.c b/libgfortran/caf/single.c index 773941bc086..e264fc50662 100644 --- a/libgfortran/caf/single.c +++ b/libgfortran/caf/single.c @@ -211,6 +211,16 @@ _gfortran_caf_error_stop (int32_t error) void +_gfortran_caf_co_broadcast (gfc_descriptor_t *a __attribute__ ((unused)), + int source_image __attribute__ ((unused)), + int *stat, char *errmsg __attribute__ ((unused)), + int errmsg_len __attribute__ ((unused))) +{ + if (stat) + *stat = 0; +} + +void _gfortran_caf_co_sum (gfc_descriptor_t *a __attribute__ ((unused)), int result_image __attribute__ ((unused)), int *stat, char *errmsg __attribute__ ((unused)), @@ -224,7 +234,7 @@ void _gfortran_caf_co_min (gfc_descriptor_t *a __attribute__ ((unused)), int result_image __attribute__ ((unused)), int *stat, char *errmsg __attribute__ ((unused)), - int src_len __attribute__ ((unused)), + int a_len __attribute__ ((unused)), int errmsg_len __attribute__ ((unused))) { if (stat) @@ -235,7 +245,7 @@ void _gfortran_caf_co_max (gfc_descriptor_t *a __attribute__ ((unused)), int result_image __attribute__ ((unused)), int *stat, char *errmsg __attribute__ ((unused)), - int src_len __attribute__ ((unused)), + int a_len __attribute__ ((unused)), int errmsg_len __attribute__ ((unused))) { if (stat) |