All, Attached please find what I hope is the final version of the patch that adds partial support for teams of images, the last remaining major Fortran 2018 feature without current support in gfortran (or any other Fortran compiler of which I’m aware). I submitted the first draft of this patch last September. Regression tests show no unexpected failures (i.e., the output of ‘grep -w FAIL gfortran.sum’ is empty). The Changelogs are below.
Among the details remaining for future commits are the following: support for the GET_TEAM intrinsic function is incomplete, the TEAM_NUMBER intrinsic function doesn’t yet accept the optional argument, and a SYNC TEAM test is needed. Using any of the unsupported features generates a compile-time error message from gfortran or a runtime error message from OpenCoarrays. There are no internal compiler errors of which I’m aware. And there remains one big, dissertation-worthy project in handling the use of teams in the presence of failed images. Ok for trunk? Damian 2018-01-18 Damian Rouson <dam...@sourceryinstitute.org> Alessandro Fanfarillo <fanfarillo....@gmail.com> Partial support for Fortran 2018 teams features. * array.c (gfc_match_array_ref): add team attribute in coarray transfers. * check.c (gfc_check_get_team, gfc_check_team_number): add new functions for get_team and team_number. * dump-parse-tree.c (show_code_node): add new statements: form team, change team, end team, and sync team. * expr.c (gfc_find_team_co): add new function. * gfortran.h: add new statements. * intrinsic.c (add_functions): add get_team and team_number functions. * intrinsic.h: add get_team and team_number prototypes for check, simplify, and resolve. * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new functions. * iso-fortran-env.def: add the team_type derived type. * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number) (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team): add change team, end team, form team, sync team match and functions. * match.h: add new prototypes for change team, end team, form team, and sync team. * parse.c (decode_statement): add cases for change team, end team, form team, and sync team. * resolve.c: add cases for exec form team, change team, end team, and sync team. * simplify.c (gfc_simplify_get_team): add new function for get team. * st.c (gfc_free_statement): add cases exec for change team, end team, form team, sync team. * trans-decl.c (gfor_fndecl_caf_form_team) (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team) (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team) (gfor_fndecl_caf_team_number): add functions and definitions. * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add new function and team_type argument support. * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team) (gfc_trans_end_team, gfc_trans_sync_team): add new functions. * trans-stmt.h: add new prototypes. * trans-types.c (gfc_get_derived_type): check condition for team_type. * trans.c (trans_code): new exec cases for form team, change team, end team, and sync team. * trans.h: add new prototypes. 2018-01-18 Damian Rouson <dam...@sourceryinstitute.org> Alessandro Fanfarillo <fanfarillo....@gmail.com> Fortran 2018 teams tests. * gfortran.dg/team_number_1.f90: new test for team_number. * gfortran.dg/team_change_1.f90: new test for change team. * gfortran.dg/team_end_1.f90: new test for end team. * gfortran.dg/team_form_1.f90: new test for form team.
teams-patch.diff
Description: Binary data