aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-decl.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@gcc.gnu.org>2014-05-08 18:55:23 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2014-05-08 18:55:23 +0200
commitd62cf3dfbe72b168d9bde08b34e2a190cdf7eb33 (patch)
tree778c1f6a41dea0e8e0d26817d32358e245d22ded /gcc/fortran/trans-decl.c
parent272325bd6abba598a8f125dab36b626acb648b03 (diff)
downloadgcc-d62cf3dfbe72b168d9bde08b34e2a190cdf7eb33.zip
gcc-d62cf3dfbe72b168d9bde08b34e2a190cdf7eb33.tar.gz
gcc-d62cf3dfbe72b168d9bde08b34e2a190cdf7eb33.tar.bz2
check.c (check_co_minmaxsum, [...]): New.
gcc/fortran/ 2014-05-08 Tobias Burnus <burnus@net-b.de> * check.c (check_co_minmaxsum, gfc_check_co_minmax, gfc_check_co_sum): New. * error.c (gfc_notify_std): Update -std=f2008ts. * gfortran.h (gfc_isym_id): Add GFC_ISYM_CO_MAX, GFC_ISYM_CO_MIN, GFC_ISYM_CO_SUM. * intrinsic.h (gfc_check_co_minmax, gfc_check_co_sum): Declare. * intrinsic.c (add_subroutines): Add co_min, co_max and co_sum. (gfc_check_intrinsic_standard): Update text for -std=f2008ts. * intrinsic.texi (CO_MIN, CO_MAX, CO_SUM): Document them. * invoke.texi (-std=f2008ts): Update wording. * trans.h (gfor_fndecl_co_max, gfor_fndecl_co_min, gfor_fndecl_co_sum): Define. * trans-decl.c (gfor_fndecl_co_max, gfor_fndecl_co_min, gfor_fndecl_co_sum): Define. (gfc_build_builtin_function_decls): Assign to it. * trans-intrinsic.c (conv_co_minmaxsum): New. (gfc_conv_intrinsic_subroutine): Call it. libgfortran/ 2014-05-08 Tobias Burnus <burnus@net-b.de> * caf/libcaf.h (caf_vector_t, _gfortran_caf_co_sum, _gfortran_caf_co_min, _gfortran_caf_co_max): Declare * caf/single.c gcc/testsuite/ 2014-05-08 Tobias Burnus <burnus@net-b.de> * gfortran.dg/coarray_collectives_1.f90: New. * gfortran.dg/coarray_collectives_2.f90: New. * gfortran.dg/coarray_collectives_3.f90: New. * gfortran.dg/coarray_collectives_4.f90: New. * gfortran.dg/coarray_collectives_5.f90: New. * gfortran.dg/coarray_collectives_6.f90: New. * gfortran.dg/coarray/collectives_1.f90: New. * gfortran.dg/assumed_rank_5.f90: Update dg-error. * gfortran.dg/assumed_type_4.f90: Update dg-error. * gfortran.dg/bind_c_array_params.f03: Update dg-error. * gfortran.dg/bind_c_usage_28.f90: Update dg-error. * gfortran.dg/c_funloc_tests_5.f03: Update dg-error. * gfortran.dg/c_funloc_tests_6.f90: Update dg-error. * gfortran.dg/c_loc_tests_11.f03: Update dg-error. From-SVN: r210223
Diffstat (limited to 'gcc/fortran/trans-decl.c')
-rw-r--r--gcc/fortran/trans-decl.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index bd1ebab..5dd5d2a 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -131,6 +131,9 @@ tree gfor_fndecl_caf_sync_all;
tree gfor_fndecl_caf_sync_images;
tree gfor_fndecl_caf_error_stop;
tree gfor_fndecl_caf_error_stop_str;
+tree gfor_fndecl_co_max;
+tree gfor_fndecl_co_min;
+tree gfor_fndecl_co_sum;
/* Math functions. Many other math functions are handled in
@@ -3280,12 +3283,12 @@ gfc_build_builtin_function_decls (void)
gfor_fndecl_caf_sync_all = gfc_build_library_function_decl_with_spec (
get_identifier (PREFIX("caf_sync_all")), ".WW", void_type_node,
- 3, pint_type, build_pointer_type (pchar_type_node), integer_type_node);
+ 3, pint_type, pchar_type_node, integer_type_node);
gfor_fndecl_caf_sync_images = gfc_build_library_function_decl_with_spec (
get_identifier (PREFIX("caf_sync_images")), ".RRWW", void_type_node,
5, integer_type_node, pint_type, pint_type,
- build_pointer_type (pchar_type_node), integer_type_node);
+ pchar_type_node, integer_type_node);
gfor_fndecl_caf_error_stop = gfc_build_library_function_decl (
get_identifier (PREFIX("caf_error_stop")),
@@ -3298,6 +3301,21 @@ gfc_build_builtin_function_decls (void)
void_type_node, 2, pchar_type_node, gfc_int4_type_node);
/* CAF's ERROR STOP doesn't return. */
TREE_THIS_VOLATILE (gfor_fndecl_caf_error_stop_str) = 1;
+
+ gfor_fndecl_co_max = gfc_build_library_function_decl_with_spec (
+ get_identifier (PREFIX("caf_co_max")), "WR.WW",
+ void_type_node, 7, pvoid_type_node, pvoid_type_node, integer_type_node,
+ pint_type, pchar_type_node, integer_type_node, integer_type_node);
+
+ gfor_fndecl_co_min = gfc_build_library_function_decl_with_spec (
+ get_identifier (PREFIX("caf_co_min")), "WR.WW",
+ void_type_node, 7, pvoid_type_node, pvoid_type_node, integer_type_node,
+ pint_type, pchar_type_node, integer_type_node, integer_type_node);
+
+ gfor_fndecl_co_sum = gfc_build_library_function_decl_with_spec (
+ get_identifier (PREFIX("caf_co_sum")), "WR.WW",
+ void_type_node, 6, pvoid_type_node, pvoid_type_node, integer_type_node,
+ pint_type, pchar_type_node, integer_type_node);
}
gfc_build_intrinsic_function_decls ();