From b511626828a636ed6310cd94c4fa78365450fb34 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Tue, 17 Jun 2014 22:54:14 +0200 Subject: check.c (gfc_check_atomic, [...]): Use argument for GFC_ISYM_CAF_GET. gcc/fortran/ 2014-06-17 Tobias Burnus * check.c (gfc_check_atomic, gfc_check_atomic_def): Use argument for GFC_ISYM_CAF_GET. * resolve.c (resolve_variable): Enable CAF_GET insertion. (resolve_lock_unlock): Remove GFC_ISYM_CAF_GET. (resolve_ordinary_assign): Enable CAF_SEND insertion. * trans-const.c (gfc_build_string_const, gfc_build_wide_string_const): Set TYPE_STRING_FLAG. * trans-decl.c (gfor_fndecl_caf_get, gfor_fndecl_caf_send, gfor_fndecl_caf_sendget): New global variables. (gfc_build_builtin_function_decls): Initialize them; update co_min/max/sum initialization. * trans-expr.c (gfc_get_tree_for_caf_expr): Renamed from get_tree_for_caf_expr and removed static. (gfc_conv_procedure_call): Update call. * trans-intrinsic.c (caf_get_image_index, conv_caf_vector_subscript_elem, conv_caf_vector_subscript, get_caf_token_offset, gfc_conv_intrinsic_caf_get, conv_caf_send): New. (gfc_conv_intrinsic_function, gfc_conv_intrinsic_subroutine, gfc_walk_intrinsic_function): Handle CAF_GET and CAF_SEND. (conv_co_minmaxsum): Update call for remove unused vector subscript. (conv_intrinsic_atomic_def, conv_intrinsic_atomic_ref): Skip a CAF_GET of the argument. * trans-types.c (gfc_get_caf_vector_type): New. * trans-types.h (gfc_get_caf_vector_type): New. * trans.h (gfor_fndecl_caf_get, gfor_fndecl_caf_send, gfor_fndecl_caf_sendget): New global variables. (gfc_get_tree_for_caf_expr): New prototypes. libgfortran/ 2014-06-17 Tobias Burnus * caf/libcaf.h (gfc_descriptor_t): New typedef. (caf_vector_t): Update. (_gfortran_caf_co_sum, _gfortran_caf_co_max, _gfortran_caf_co_min): Remove vector-subscript argument. (_gfortran_caf_co_send, _gfortran_caf_co_get, _gfortran_caf_co_sendget): New. * caf/single.c (_gfortran_caf_co_sum, _gfortran_caf_co_max, _gfortran_caf_co_min): Remove vector-subscript argument. (_gfortran_caf_co_send, _gfortran_caf_co_get, _gfortran_caf_co_sendget): New. gcc/testsuite/ 2014-06-17 Tobias Burnus Alessandro Fanfarillo * gfortran.dg/coarray/send_array.f90: New. * gfortran.dg/coarray/get_array.f90: New. * gfortran.dg/coarray/sendget_array.f90: New. * gfortran.dg/coarray/collectives_1.f90: Correct subroutine names. * gfortran.dg/coarray/collectives_2.f90: New. Co-Authored-By: Alessandro Fanfarillo From-SVN: r211748 --- gcc/fortran/trans.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/fortran/trans.h') diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h index d1c778f..7ab9dd4 100644 --- a/gcc/fortran/trans.h +++ b/gcc/fortran/trans.h @@ -418,6 +418,7 @@ tree gfc_conv_scalar_to_descriptor (gfc_se *, tree, symbol_attribute); /* trans-expr.c */ void gfc_conv_scalar_char_value (gfc_symbol *sym, gfc_se *se, gfc_expr **expr); tree gfc_string_to_single_character (tree len, tree str, int kind); +tree gfc_get_tree_for_caf_expr (gfc_expr *); /* Find the decl containing the auxiliary variables for assigned variables. */ void gfc_conv_label_variable (gfc_se * se, gfc_expr * expr); @@ -708,6 +709,9 @@ extern GTY(()) tree gfor_fndecl_caf_this_image; extern GTY(()) tree gfor_fndecl_caf_num_images; extern GTY(()) tree gfor_fndecl_caf_register; extern GTY(()) tree gfor_fndecl_caf_deregister; +extern GTY(()) tree gfor_fndecl_caf_get; +extern GTY(()) tree gfor_fndecl_caf_send; +extern GTY(()) tree gfor_fndecl_caf_sendget; extern GTY(()) tree gfor_fndecl_caf_critical; extern GTY(()) tree gfor_fndecl_caf_end_critical; extern GTY(()) tree gfor_fndecl_caf_sync_all; -- cgit v1.1