Skip to content

Commit 83ff993

Browse files
authored
Merge pull request #14 from sourceryinstitute/scrasmussen/teamsCleanupAndFormatting
Scrasmussen/teams cleanup and formatting
2 parents 62bf309 + 7c3627b commit 83ff993

File tree

7 files changed

+13
-26
lines changed

7 files changed

+13
-26
lines changed

gcc/fortran/array.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ gfc_match_array_ref (gfc_array_ref *ar, gfc_array_spec *as, int init,
234234
team_just_seen = false;
235235
stat_just_seen = false;
236236

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

249-
if (gfc_match(" , stat = %e",&tmp) == MATCH_YES && ar->stat == NULL)
249+
if (gfc_match (" , stat = %e",&tmp) == MATCH_YES && ar->stat == NULL)
250250
{
251251
ar->stat = tmp;
252252
stat_just_seen = true;

gcc/fortran/expr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4975,7 +4975,7 @@ gfc_ref_this_image (gfc_ref *ref)
49754975
}
49764976

49774977
gfc_expr *
4978-
gfc_find_team_co(gfc_expr *e)
4978+
gfc_find_team_co (gfc_expr *e)
49794979
{
49804980
gfc_ref *ref;
49814981

@@ -4993,7 +4993,7 @@ gfc_find_team_co(gfc_expr *e)
49934993
}
49944994

49954995
gfc_expr *
4996-
gfc_find_stat_co(gfc_expr *e)
4996+
gfc_find_stat_co (gfc_expr *e)
49974997
{
49984998
gfc_ref *ref;
49994999

gcc/fortran/intrinsic.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1940,9 +1940,7 @@ add_functions (void)
19401940

19411941
add_sym_1 ("get_team", GFC_ISYM_GET_TEAM, CLASS_TRANSFORMATIONAL,
19421942
ACTUAL_NO, BT_INTEGER, di, GFC_STD_F2008_TS,
1943-
gfc_check_get_team,
1944-
NULL,
1945-
gfc_resolve_get_team,
1943+
gfc_check_get_team, NULL, gfc_resolve_get_team,
19461944
"level", BT_INTEGER, di, OPTIONAL);
19471945

19481946
add_sym_0 ("getuid", GFC_ISYM_GETUID, CLASS_IMPURE, ACTUAL_NO, BT_INTEGER,

gcc/fortran/match.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3401,11 +3401,6 @@ gfc_match_change_team (void)
34013401

34023402
new_st.op = EXEC_CHANGE_TEAM;
34033403

3404-
/* if (gfc_match ("%e", &teamid) != MATCH_YES) */
3405-
/* goto syntax; */
3406-
/* m = gfc_match_char (','); */
3407-
/* if (m == MATCH_ERROR) */
3408-
/* goto syntax; */
34093404
if (gfc_match ("%e", &team) != MATCH_YES)
34103405
goto syntax;
34113406

gcc/fortran/trans-decl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3363,7 +3363,7 @@ gfc_build_intrinsic_function_decls (void)
33633363
jtype = gfc_get_int_type (ikinds[jkind]);
33643364
if (itype && jtype)
33653365
{
3366-
sprintf(name, PREFIX("pow_i%d_i%d"), ikinds[ikind],
3366+
sprintf (name, PREFIX("pow_i%d_i%d"), ikinds[ikind],
33673367
ikinds[jkind]);
33683368
gfor_fndecl_math_powi[jkind][ikind].integer =
33693369
gfc_build_library_function_decl (get_identifier (name),
@@ -3378,7 +3378,7 @@ gfc_build_intrinsic_function_decls (void)
33783378
rtype = gfc_get_real_type (rkinds[rkind]);
33793379
if (rtype && itype)
33803380
{
3381-
sprintf(name, PREFIX("pow_r%d_i%d"), rkinds[rkind],
3381+
sprintf (name, PREFIX("pow_r%d_i%d"), rkinds[rkind],
33823382
ikinds[ikind]);
33833383
gfor_fndecl_math_powi[rkind][ikind].real =
33843384
gfc_build_library_function_decl (get_identifier (name),
@@ -3390,7 +3390,7 @@ gfc_build_intrinsic_function_decls (void)
33903390
ctype = gfc_get_complex_type (rkinds[rkind]);
33913391
if (ctype && itype)
33923392
{
3393-
sprintf(name, PREFIX("pow_c%d_i%d"), rkinds[rkind],
3393+
sprintf (name, PREFIX("pow_c%d_i%d"), rkinds[rkind],
33943394
ikinds[ikind]);
33953395
gfor_fndecl_math_powi[rkind][ikind].cmplx =
33963396
gfc_build_library_function_decl (get_identifier (name),

gcc/fortran/trans-intrinsic.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,6 @@ gfc_conv_intrinsic_lib_function (gfc_se * se, gfc_expr * expr)
853853

854854
if (m->id == GFC_ISYM_NONE)
855855
{
856-
printf("Id %d none %d\n",id,GFC_ISYM_NONE);
857856
gfc_internal_error ("Intrinsic function %qs (%d) not recognized",
858857
expr->value.function.name, id);
859858
}
@@ -1852,7 +1851,7 @@ conv_caf_send (gfc_code *code) {
18521851
gfc_se lhs_se, rhs_se;
18531852
stmtblock_t block;
18541853
tree caf_decl, token, offset, image_index, tmp, lhs_kind, rhs_kind;
1855-
tree may_require_tmp, src_stat, dst_stat, dst_team, src_team;
1854+
tree may_require_tmp, src_stat, dst_stat, dst_team;
18561855
tree lhs_type = NULL_TREE;
18571856
tree vec = null_pointer_node, rhs_vec = null_pointer_node;
18581857
symbol_attribute lhs_caf_attr, rhs_caf_attr;
@@ -1868,7 +1867,7 @@ conv_caf_send (gfc_code *code) {
18681867
lhs_caf_attr = gfc_caf_attr (lhs_expr);
18691868
rhs_caf_attr = gfc_caf_attr (rhs_expr);
18701869
src_stat = dst_stat = null_pointer_node;
1871-
src_team = dst_team = null_pointer_node;
1870+
dst_team = null_pointer_node;
18721871

18731872
/* LHS. */
18741873
gfc_init_se (&lhs_se, NULL);

gcc/fortran/trans-stmt.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -735,16 +735,13 @@ gfc_trans_change_team (gfc_code *code)
735735
{
736736
gfc_se argse;
737737
tree team_type;
738-
/* gfc_init_se (&argse, NULL); */
739-
/* gfc_conv_expr_val (&argse, code->expr1); */
740-
/* team_id = fold_convert (integer_type_node, argse.expr); */
738+
741739
gfc_init_se (&argse, NULL);
742740
gfc_conv_expr_val (&argse, code->expr1);
743741
team_type = gfc_build_addr_expr (ppvoid_type_node, argse.expr);
744742

745743
return build_call_expr_loc (input_location,
746-
gfor_fndecl_caf_change_team, 2,
747-
team_type,
744+
gfor_fndecl_caf_change_team, 2, team_type,
748745
build_int_cst (integer_type_node, 0));
749746
}
750747
else
@@ -785,9 +782,7 @@ gfc_trans_sync_team (gfc_code *code)
785782
{
786783
gfc_se argse;
787784
tree team_type;
788-
/* gfc_init_se (&argse, NULL); */
789-
/* gfc_conv_expr_val (&argse, code->expr1); */
790-
/* team_id = fold_convert (integer_type_node, argse.expr); */
785+
791786
gfc_init_se (&argse, NULL);
792787
gfc_conv_expr_val (&argse, code->expr1);
793788
team_type = gfc_build_addr_expr (ppvoid_type_node, argse.expr);

0 commit comments

Comments
 (0)