Skip to content

Scrasmussen/teams cleanup and formatting #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Nov 13, 2017
4 changes: 2 additions & 2 deletions gcc/fortran/array.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ gfc_match_array_ref (gfc_array_ref *ar, gfc_array_spec *as, int init,
team_just_seen = false;
stat_just_seen = false;

if (gfc_match(" , team = %e",&tmp) == MATCH_YES && ar->stat == NULL)
if (gfc_match (" , team = %e", &tmp) == MATCH_YES && ar->stat == NULL)
{
ar->team = tmp;
team_just_seen = true;
Expand All @@ -246,7 +246,7 @@ gfc_match_array_ref (gfc_array_ref *ar, gfc_array_spec *as, int init,
return MATCH_ERROR;
}

if (gfc_match(" , stat = %e",&tmp) == MATCH_YES && ar->stat == NULL)
if (gfc_match (" , stat = %e",&tmp) == MATCH_YES && ar->stat == NULL)
{
ar->stat = tmp;
stat_just_seen = true;
Expand Down
4 changes: 2 additions & 2 deletions gcc/fortran/expr.c
Original file line number Diff line number Diff line change
Expand Up @@ -4975,7 +4975,7 @@ gfc_ref_this_image (gfc_ref *ref)
}

gfc_expr *
gfc_find_team_co(gfc_expr *e)
gfc_find_team_co (gfc_expr *e)
{
gfc_ref *ref;

Expand All @@ -4993,7 +4993,7 @@ gfc_find_team_co(gfc_expr *e)
}

gfc_expr *
gfc_find_stat_co(gfc_expr *e)
gfc_find_stat_co (gfc_expr *e)
{
gfc_ref *ref;

Expand Down
4 changes: 1 addition & 3 deletions gcc/fortran/intrinsic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1940,9 +1940,7 @@ add_functions (void)

add_sym_1 ("get_team", GFC_ISYM_GET_TEAM, CLASS_TRANSFORMATIONAL,
ACTUAL_NO, BT_INTEGER, di, GFC_STD_F2008_TS,
gfc_check_get_team,
NULL,
gfc_resolve_get_team,
gfc_check_get_team, NULL, gfc_resolve_get_team,
"level", BT_INTEGER, di, OPTIONAL);

add_sym_0 ("getuid", GFC_ISYM_GETUID, CLASS_IMPURE, ACTUAL_NO, BT_INTEGER,
Expand Down
5 changes: 0 additions & 5 deletions gcc/fortran/match.c
Original file line number Diff line number Diff line change
Expand Up @@ -3401,11 +3401,6 @@ gfc_match_change_team (void)

new_st.op = EXEC_CHANGE_TEAM;

/* if (gfc_match ("%e", &teamid) != MATCH_YES) */
/* goto syntax; */
/* m = gfc_match_char (','); */
/* if (m == MATCH_ERROR) */
/* goto syntax; */
if (gfc_match ("%e", &team) != MATCH_YES)
goto syntax;

Expand Down
6 changes: 3 additions & 3 deletions gcc/fortran/trans-decl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3363,7 +3363,7 @@ gfc_build_intrinsic_function_decls (void)
jtype = gfc_get_int_type (ikinds[jkind]);
if (itype && jtype)
{
sprintf(name, PREFIX("pow_i%d_i%d"), ikinds[ikind],
sprintf (name, PREFIX("pow_i%d_i%d"), ikinds[ikind],
ikinds[jkind]);
gfor_fndecl_math_powi[jkind][ikind].integer =
gfc_build_library_function_decl (get_identifier (name),
Expand All @@ -3378,7 +3378,7 @@ gfc_build_intrinsic_function_decls (void)
rtype = gfc_get_real_type (rkinds[rkind]);
if (rtype && itype)
{
sprintf(name, PREFIX("pow_r%d_i%d"), rkinds[rkind],
sprintf (name, PREFIX("pow_r%d_i%d"), rkinds[rkind],
ikinds[ikind]);
gfor_fndecl_math_powi[rkind][ikind].real =
gfc_build_library_function_decl (get_identifier (name),
Expand All @@ -3390,7 +3390,7 @@ gfc_build_intrinsic_function_decls (void)
ctype = gfc_get_complex_type (rkinds[rkind]);
if (ctype && itype)
{
sprintf(name, PREFIX("pow_c%d_i%d"), rkinds[rkind],
sprintf (name, PREFIX("pow_c%d_i%d"), rkinds[rkind],
ikinds[ikind]);
gfor_fndecl_math_powi[rkind][ikind].cmplx =
gfc_build_library_function_decl (get_identifier (name),
Expand Down
5 changes: 2 additions & 3 deletions gcc/fortran/trans-intrinsic.c
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,6 @@ gfc_conv_intrinsic_lib_function (gfc_se * se, gfc_expr * expr)

if (m->id == GFC_ISYM_NONE)
{
printf("Id %d none %d\n",id,GFC_ISYM_NONE);
gfc_internal_error ("Intrinsic function %qs (%d) not recognized",
expr->value.function.name, id);
}
Expand Down Expand Up @@ -1852,7 +1851,7 @@ conv_caf_send (gfc_code *code) {
gfc_se lhs_se, rhs_se;
stmtblock_t block;
tree caf_decl, token, offset, image_index, tmp, lhs_kind, rhs_kind;
tree may_require_tmp, src_stat, dst_stat, dst_team, src_team;
tree may_require_tmp, src_stat, dst_stat, dst_team;
tree lhs_type = NULL_TREE;
tree vec = null_pointer_node, rhs_vec = null_pointer_node;
symbol_attribute lhs_caf_attr, rhs_caf_attr;
Expand All @@ -1868,7 +1867,7 @@ conv_caf_send (gfc_code *code) {
lhs_caf_attr = gfc_caf_attr (lhs_expr);
rhs_caf_attr = gfc_caf_attr (rhs_expr);
src_stat = dst_stat = null_pointer_node;
src_team = dst_team = null_pointer_node;
dst_team = null_pointer_node;

/* LHS. */
gfc_init_se (&lhs_se, NULL);
Expand Down
11 changes: 3 additions & 8 deletions gcc/fortran/trans-stmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -735,16 +735,13 @@ gfc_trans_change_team (gfc_code *code)
{
gfc_se argse;
tree team_type;
/* gfc_init_se (&argse, NULL); */
/* gfc_conv_expr_val (&argse, code->expr1); */
/* team_id = fold_convert (integer_type_node, argse.expr); */

gfc_init_se (&argse, NULL);
gfc_conv_expr_val (&argse, code->expr1);
team_type = gfc_build_addr_expr (ppvoid_type_node, argse.expr);

return build_call_expr_loc (input_location,
gfor_fndecl_caf_change_team, 2,
team_type,
gfor_fndecl_caf_change_team, 2, team_type,
build_int_cst (integer_type_node, 0));
}
else
Expand Down Expand Up @@ -785,9 +782,7 @@ gfc_trans_sync_team (gfc_code *code)
{
gfc_se argse;
tree team_type;
/* gfc_init_se (&argse, NULL); */
/* gfc_conv_expr_val (&argse, code->expr1); */
/* team_id = fold_convert (integer_type_node, argse.expr); */

gfc_init_se (&argse, NULL);
gfc_conv_expr_val (&argse, code->expr1);
team_type = gfc_build_addr_expr (ppvoid_type_node, argse.expr);
Expand Down