aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/intrinsic.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2014-09-25 08:07:15 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2014-09-25 08:07:15 +0200
commita16ee37946f575365bb39d238863422465902054 (patch)
treeea6982429800a36515244a6e806f388dff9ccc3b /gcc/fortran/intrinsic.c
parent2bde8cac3724cd02c8114275f5c4688f25558859 (diff)
downloadgcc-a16ee37946f575365bb39d238863422465902054.zip
gcc-a16ee37946f575365bb39d238863422465902054.tar.gz
gcc-a16ee37946f575365bb39d238863422465902054.tar.bz2
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 'gcc/fortran/intrinsic.c')
-rw-r--r--gcc/fortran/intrinsic.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c
index 1ad1e69..9bc9b3c 100644
--- a/gcc/fortran/intrinsic.c
+++ b/gcc/fortran/intrinsic.c
@@ -3294,6 +3294,14 @@ add_subroutines (void)
make_from_module();
/* Coarray collectives. */
+ add_sym_4s ("co_broadcast", GFC_ISYM_CO_BROADCAST, CLASS_IMPURE,
+ BT_UNKNOWN, 0, GFC_STD_F2008_TS,
+ gfc_check_co_broadcast, NULL, NULL,
+ a, BT_REAL, dr, REQUIRED, INTENT_INOUT,
+ "source_image", BT_INTEGER, di, REQUIRED, INTENT_IN,
+ stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT,
+ errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_OUT);
+
add_sym_4s ("co_max", GFC_ISYM_CO_MAX, CLASS_IMPURE,
BT_UNKNOWN, 0, GFC_STD_F2008_TS,
gfc_check_co_minmax, NULL, NULL,
@@ -3318,6 +3326,16 @@ add_subroutines (void)
stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT,
errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_OUT);
+ add_sym_5s ("co_reduce", GFC_ISYM_CO_REDUCE, CLASS_IMPURE,
+ BT_UNKNOWN, 0, GFC_STD_F2008_TS,
+ gfc_check_co_reduce, NULL, NULL,
+ a, BT_REAL, dr, REQUIRED, INTENT_INOUT,
+ "operator", BT_INTEGER, di, REQUIRED, INTENT_IN,
+ result_image, BT_INTEGER, di, OPTIONAL, INTENT_IN,
+ stat, BT_INTEGER, di, OPTIONAL, INTENT_OUT,
+ errmsg, BT_CHARACTER, dc, OPTIONAL, INTENT_OUT);
+
+
/* The following subroutine is internally used for coarray libray functions.
"make_from_module" makes it inaccessible for external users. */
add_sym_2s (GFC_PREFIX ("caf_send"), GFC_ISYM_CAF_SEND, CLASS_IMPURE,