Skip to content

Commit

Permalink
Edits based on ./contrib/check_GNU_style.sh output
Browse files Browse the repository at this point in the history
  • Loading branch information
rouson committed Jan 18, 2018
1 parent 81a4a71 commit 6bc3241
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 30 deletions.
42 changes: 21 additions & 21 deletions gcc/fortran/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
2018-01-19 Damian Rouson <damian@sourceryinstitute.org>
2018-01-18 Damian Rouson <damian@sourceryinstitute.org>
Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>

Partial support for Fortran 2018 teams features.

* array.c (gfc_match_array_ref): add team attribute in coarray
* array.c (gfc_match_array_ref): add team attribute in coarray
transfers.
* check.c (gfc_check_get_team, gfc_check_team_number): add new
* 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,
* 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,
* 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
* 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)
* 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,
* 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,
* 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
* 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,
* 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)
* 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
* 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)
* 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-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.
Expand Down
8 changes: 4 additions & 4 deletions gcc/fortran/check.c
Original file line number Diff line number Diff line change
Expand Up @@ -2278,7 +2278,7 @@ gfc_check_eoshift (gfc_expr *array, gfc_expr *shift, gfc_expr *boundary,
return false;
}
}

if (array->rank == 1 || boundary->rank == 0)
{
if (!scalar_check (boundary, 2))
Expand Down Expand Up @@ -2327,7 +2327,7 @@ gfc_check_eoshift (gfc_expr *array, gfc_expr *shift, gfc_expr *boundary,
case BT_COMPLEX:
case BT_CHARACTER:
break;

default:
gfc_error ("Missing %qs argument to %qs intrinsic at %L for %qs "
"of type %qs", gfc_current_intrinsic_arg[2]->name,
Expand Down Expand Up @@ -5299,8 +5299,8 @@ gfc_check_team_number (gfc_expr *team)

if (team)
{
/* todo: this works on any derived type when
it should only work with type team */
/* TODO: this works on any derived type when
it should only work with team_type. */
if (team->ts.type != BT_DERIVED)
{
gfc_error ("TEAM argument at %L to the intrinsic TEAM_NUMBER "
Expand Down
2 changes: 1 addition & 1 deletion gcc/fortran/intrinsic.c
Original file line number Diff line number Diff line change
Expand Up @@ -3070,7 +3070,7 @@ add_functions (void)

add_sym_1 ("team_number", GFC_ISYM_TEAM_NUMBER, CLASS_TRANSFORMATIONAL,
ACTUAL_YES, BT_INTEGER, di, GFC_STD_F2008_TS,
gfc_check_team_number, NULL, gfc_resolve_team_number,
gfc_check_team_number, NULL, gfc_resolve_team_number,
team, BT_DERIVED, di, OPTIONAL);

add_sym_3 ("this_image", GFC_ISYM_THIS_IMAGE, CLASS_INQUIRY, ACTUAL_NO, BT_INTEGER, di, GFC_STD_F2008,
Expand Down
7 changes: 4 additions & 3 deletions gcc/fortran/trans-intrinsic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2456,7 +2456,8 @@ conv_intrinsic_team_number (gfc_se *se, gfc_expr *expr)
args = XALLOCAVEC (tree, num_args);
gfc_conv_intrinsic_function_args (se, expr, args, num_args);

if (flag_coarray == GFC_FCOARRAY_SINGLE && expr->value.function.actual->expr)
if (flag_coarray ==
GFC_FCOARRAY_SINGLE && expr->value.function.actual->expr)
{
tree arg;

Expand All @@ -2479,7 +2480,7 @@ conv_intrinsic_team_number (gfc_se *se, gfc_expr *expr)
args[0], build_int_cst (integer_type_node, -1));
else if (flag_coarray == GFC_FCOARRAY_LIB)
tmp = build_call_expr_loc (input_location, gfor_fndecl_caf_team_number, 1,
integer_zero_node, build_int_cst (integer_type_node, -1));
integer_zero_node, build_int_cst (integer_type_node, -1));
else
gcc_unreachable ();

Expand Down Expand Up @@ -9235,7 +9236,7 @@ gfc_conv_intrinsic_function (gfc_se * se, gfc_expr * expr)
break;

case GFC_ISYM_TEAM_NUMBER:
conv_intrinsic_team_number(se, expr);
conv_intrinsic_team_number (se, expr);
break;

case GFC_ISYM_TRANSFER:
Expand Down
2 changes: 1 addition & 1 deletion gcc/testsuite/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
2018-01-19 Damian Rouson <damian@sourceryinstitute.org>
2018-01-18 Damian Rouson <damian@sourceryinstitute.org>
Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>

Fortran 2018 teams tests.
Expand Down

0 comments on commit 6bc3241

Please sign in to comment.