Skip to content

Commit 14c800d

Browse files
author
Damian Rouson
committed
Revert "Merge pull request #8 from sourceryinstitute/teams"
This reverts commit 71c41bf, reversing changes made to 7204ca4.
1 parent eab80f7 commit 14c800d

22 files changed

+14
-487
lines changed

gcc/fortran/array.c

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,7 @@ gfc_match_array_ref (gfc_array_ref *ar, gfc_array_spec *as, int init,
158158
bool matched_bracket = false;
159159
gfc_expr *tmp;
160160
bool stat_just_seen = false;
161-
bool team_just_seen = false;
162-
161+
163162
memset (ar, '\0', sizeof (*ar));
164163

165164
ar->where = gfc_current_locus;
@@ -231,21 +230,7 @@ gfc_match_array_ref (gfc_array_ref *ar, gfc_array_spec *as, int init,
231230
if (m == MATCH_ERROR)
232231
return MATCH_ERROR;
233232

234-
team_just_seen = false;
235233
stat_just_seen = false;
236-
237-
if (gfc_match(" , team = %e",&tmp) == MATCH_YES && ar->stat == NULL)
238-
{
239-
ar->team = tmp;
240-
team_just_seen = true;
241-
}
242-
243-
if (ar->team && !team_just_seen)
244-
{
245-
gfc_error ("TEAM= attribute in %C misplaced");
246-
return MATCH_ERROR;
247-
}
248-
249234
if (gfc_match(" , stat = %e",&tmp) == MATCH_YES && ar->stat == NULL)
250235
{
251236
ar->stat = tmp;

gcc/fortran/check.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,20 +1213,6 @@ gfc_check_failed_or_stopped_images (gfc_expr *team, gfc_expr *kind)
12131213
return true;
12141214
}
12151215

1216-
bool
1217-
gfc_check_get_team (gfc_expr *level)
1218-
{
1219-
if (level)
1220-
{
1221-
gfc_error ("%qs argument of %qs intrinsic at %L not yet supported",
1222-
gfc_current_intrinsic_arg[0]->name, gfc_current_intrinsic,
1223-
&level->where);
1224-
return false;
1225-
}
1226-
1227-
return true;
1228-
}
1229-
12301216

12311217
bool
12321218
gfc_check_atomic_cas (gfc_expr *atom, gfc_expr *old, gfc_expr *compare,

gcc/fortran/dump-parse-tree.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1869,22 +1869,6 @@ show_code_node (int level, gfc_code *c)
18691869
fputs ("FAIL IMAGE ", dumpfile);
18701870
break;
18711871

1872-
case EXEC_CHANGE_TEAM:
1873-
fputs ("CHANGE TEAM", dumpfile);
1874-
break;
1875-
1876-
case EXEC_END_TEAM:
1877-
fputs ("END TEAM", dumpfile);
1878-
break;
1879-
1880-
case EXEC_FORM_TEAM:
1881-
fputs ("FORM TEAM", dumpfile);
1882-
break;
1883-
1884-
case EXEC_SYNC_TEAM:
1885-
fputs ("SYNC TEAM", dumpfile);
1886-
break;
1887-
18881872
case EXEC_SYNC_ALL:
18891873
fputs ("SYNC ALL ", dumpfile);
18901874
if (c->expr2 != NULL)

gcc/fortran/expr.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4982,24 +4982,6 @@ gfc_ref_this_image (gfc_ref *ref)
49824982
return true;
49834983
}
49844984

4985-
gfc_expr *
4986-
gfc_find_team_co(gfc_expr *e)
4987-
{
4988-
gfc_ref *ref;
4989-
4990-
for (ref = e->ref; ref; ref = ref->next)
4991-
if (ref->type == REF_ARRAY && ref->u.ar.codimen > 0)
4992-
return ref->u.ar.team;
4993-
4994-
if (e->value.function.actual->expr)
4995-
for (ref = e->value.function.actual->expr->ref; ref;
4996-
ref = ref->next)
4997-
if (ref->type == REF_ARRAY && ref->u.ar.codimen > 0)
4998-
return ref->u.ar.team;
4999-
5000-
return NULL;
5001-
}
5002-
50034985
gfc_expr *
50044986
gfc_find_stat_co(gfc_expr *e)
50054987
{

gcc/fortran/gfortran.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,7 @@ enum gfc_statement
263263
ST_OMP_TASKLOOP_SIMD, ST_OMP_END_TASKLOOP_SIMD, ST_OMP_ORDERED_DEPEND,
264264
ST_PROCEDURE, ST_GENERIC, ST_CRITICAL, ST_END_CRITICAL,
265265
ST_GET_FCN_CHARACTERISTICS, ST_LOCK, ST_UNLOCK, ST_EVENT_POST,
266-
ST_EVENT_WAIT, ST_FAIL_IMAGE, ST_FORM_TEAM, ST_CHANGE_TEAM,
267-
ST_END_TEAM, ST_SYNC_TEAM, ST_NONE
266+
ST_EVENT_WAIT,ST_FAIL_IMAGE,ST_NONE
268267
};
269268

270269
/* Types of interfaces that we can have. Assignment interfaces are
@@ -457,7 +456,6 @@ enum gfc_isym_id
457456
GFC_ISYM_GETLOG,
458457
GFC_ISYM_GETPID,
459458
GFC_ISYM_GETUID,
460-
GFC_ISYM_GET_TEAM,
461459
GFC_ISYM_GMTIME,
462460
GFC_ISYM_HOSTNM,
463461
GFC_ISYM_HUGE,
@@ -1915,7 +1913,6 @@ typedef struct gfc_array_ref
19151913
int dimen; /* # of components in the reference */
19161914
int codimen;
19171915
bool in_allocate; /* For coarray checks. */
1918-
gfc_expr *team;
19191916
gfc_expr *stat;
19201917
locus where;
19211918
gfc_array_spec *as;
@@ -2491,7 +2488,6 @@ enum gfc_exec_op
24912488
EXEC_OPEN, EXEC_CLOSE, EXEC_WAIT,
24922489
EXEC_READ, EXEC_WRITE, EXEC_IOLENGTH, EXEC_TRANSFER, EXEC_DT_END,
24932490
EXEC_BACKSPACE, EXEC_ENDFILE, EXEC_INQUIRE, EXEC_REWIND, EXEC_FLUSH,
2494-
EXEC_FORM_TEAM, EXEC_CHANGE_TEAM, EXEC_END_TEAM, EXEC_SYNC_TEAM,
24952491
EXEC_LOCK, EXEC_UNLOCK, EXEC_EVENT_POST, EXEC_EVENT_WAIT, EXEC_FAIL_IMAGE,
24962492
EXEC_OACC_KERNELS_LOOP, EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_ROUTINE,
24972493
EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS, EXEC_OACC_DATA, EXEC_OACC_HOST_DATA,
@@ -3206,7 +3202,6 @@ bool gfc_is_coarray (gfc_expr *);
32063202
int gfc_get_corank (gfc_expr *);
32073203
bool gfc_has_ultimate_allocatable (gfc_expr *);
32083204
bool gfc_has_ultimate_pointer (gfc_expr *);
3209-
gfc_expr* gfc_find_team_co (gfc_expr *);
32103205
gfc_expr* gfc_find_stat_co (gfc_expr *);
32113206
gfc_expr* gfc_build_intrinsic_call (gfc_namespace *, gfc_isym_id, const char*,
32123207
locus, unsigned, ...);

gcc/fortran/intrinsic.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1938,13 +1938,6 @@ add_functions (void)
19381938

19391939
make_generic ("getpid", GFC_ISYM_GETPID, GFC_STD_GNU);
19401940

1941-
add_sym_1 ("get_team", GFC_ISYM_GET_TEAM, CLASS_TRANSFORMATIONAL,
1942-
ACTUAL_NO, BT_INTEGER, di, GFC_STD_F2008_TS,
1943-
gfc_check_get_team,
1944-
NULL,
1945-
gfc_resolve_get_team,
1946-
"level", BT_INTEGER, di, OPTIONAL);
1947-
19481941
add_sym_0 ("getuid", GFC_ISYM_GETUID, CLASS_IMPURE, ACTUAL_NO, BT_INTEGER,
19491942
di, GFC_STD_GNU, NULL, NULL, gfc_resolve_getuid);
19501943

gcc/fortran/intrinsic.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ bool gfc_check_fn_r (gfc_expr *);
8383
bool gfc_check_fn_rc (gfc_expr *);
8484
bool gfc_check_fn_rc2008 (gfc_expr *);
8585
bool gfc_check_fnum (gfc_expr *);
86-
bool gfc_check_get_team (gfc_expr *);
8786
bool gfc_check_hostnm (gfc_expr *);
8887
bool gfc_check_huge (gfc_expr *);
8988
bool gfc_check_hypot (gfc_expr *, gfc_expr *);
@@ -300,7 +299,6 @@ gfc_expr *gfc_simplify_float (gfc_expr *);
300299
gfc_expr *gfc_simplify_floor (gfc_expr *, gfc_expr *);
301300
gfc_expr *gfc_simplify_fraction (gfc_expr *);
302301
gfc_expr *gfc_simplify_gamma (gfc_expr *);
303-
gfc_expr *gfc_simplify_get_team (gfc_expr *);
304302
gfc_expr *gfc_simplify_huge (gfc_expr *);
305303
gfc_expr *gfc_simplify_hypot (gfc_expr *, gfc_expr *);
306304
gfc_expr *gfc_simplify_iachar (gfc_expr *, gfc_expr *);
@@ -495,7 +493,6 @@ void gfc_resolve_gamma (gfc_expr *, gfc_expr *);
495493
void gfc_resolve_getcwd (gfc_expr *, gfc_expr *);
496494
void gfc_resolve_getgid (gfc_expr *);
497495
void gfc_resolve_getpid (gfc_expr *);
498-
void gfc_resolve_get_team (gfc_expr *, gfc_expr *);
499496
void gfc_resolve_getuid (gfc_expr *);
500497
void gfc_resolve_hostnm (gfc_expr *, gfc_expr *);
501498
void gfc_resolve_hypot (gfc_expr *, gfc_expr *, gfc_expr *);

gcc/fortran/iresolve.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2859,18 +2859,6 @@ gfc_resolve_image_status (gfc_expr *f, gfc_expr *image ATTRIBUTE_UNUSED,
28592859
f->value.function.name = image_status;
28602860
}
28612861

2862-
/* Resolve get_team (). */
2863-
2864-
void
2865-
gfc_resolve_get_team (gfc_expr *f, gfc_expr *level ATTRIBUTE_UNUSED)
2866-
{
2867-
static char get_team[] = "_gfortran_caf_get_team";
2868-
f->rank = 0;
2869-
f->ts.type = BT_INTEGER;
2870-
f->ts.kind = gfc_default_integer_kind;
2871-
f->value.function.name = get_team;
2872-
}
2873-
28742862

28752863
/* Resolve image_index (...). */
28762864

gcc/fortran/iso-fortran-env.def

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,7 @@ NAMED_DERIVED_TYPE (ISOFORTRAN_LOCK_TYPE, "lock_type", \
125125

126126
NAMED_DERIVED_TYPE (ISOFORTRAN_EVENT_TYPE, "event_type", \
127127
flag_coarray == GFC_FCOARRAY_LIB
128-
? get_int_kind_from_node (ptr_type_node)
129-
: gfc_default_integer_kind, GFC_STD_F2008_TS)
130-
131-
NAMED_DERIVED_TYPE (ISOFORTRAN_TEAM_TYPE, "team_type", \
132-
flag_coarray == GFC_FCOARRAY_LIB
133-
? get_int_kind_from_node (ptr_type_node)
128+
? get_int_kind_from_node (ptr_type_node)
134129
: gfc_default_integer_kind, GFC_STD_F2008_TS)
135130

136131
#undef NAMED_INTCST

gcc/fortran/match.c

Lines changed: 1 addition & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,19 +1595,16 @@ gfc_match_if (gfc_statement *if_type)
15951595
match ("assign", gfc_match_assign, ST_LABEL_ASSIGNMENT)
15961596
match ("backspace", gfc_match_backspace, ST_BACKSPACE)
15971597
match ("call", gfc_match_call, ST_CALL)
1598-
match ("change team", gfc_match_change_team, ST_CHANGE_TEAM)
15991598
match ("close", gfc_match_close, ST_CLOSE)
16001599
match ("continue", gfc_match_continue, ST_CONTINUE)
16011600
match ("cycle", gfc_match_cycle, ST_CYCLE)
16021601
match ("deallocate", gfc_match_deallocate, ST_DEALLOCATE)
16031602
match ("end file", gfc_match_endfile, ST_END_FILE)
1604-
match ("end team", gfc_match_end_team, ST_END_TEAM)
16051603
match ("error stop", gfc_match_error_stop, ST_ERROR_STOP)
16061604
match ("event post", gfc_match_event_post, ST_EVENT_POST)
16071605
match ("event wait", gfc_match_event_wait, ST_EVENT_WAIT)
16081606
match ("exit", gfc_match_exit, ST_EXIT)
16091607
match ("fail image", gfc_match_fail_image, ST_FAIL_IMAGE)
1610-
match ("form team", gfc_match_form_team, ST_FORM_TEAM)
16111608
match ("flush", gfc_match_flush, ST_FLUSH)
16121609
match ("forall", match_simple_forall, ST_FORALL)
16131610
match ("go to", gfc_match_goto, ST_GOTO)
@@ -1623,7 +1620,6 @@ gfc_match_if (gfc_statement *if_type)
16231620
match ("rewind", gfc_match_rewind, ST_REWIND)
16241621
match ("stop", gfc_match_stop, ST_STOP)
16251622
match ("wait", gfc_match_wait, ST_WAIT)
1626-
match ("sync team", gfc_match_sync_team, ST_SYNC_TEAM)
16271623
match ("sync all", gfc_match_sync_all, ST_SYNC_CALL);
16281624
match ("sync images", gfc_match_sync_images, ST_SYNC_IMAGES);
16291625
match ("sync memory", gfc_match_sync_memory, ST_SYNC_MEMORY);
@@ -1663,6 +1659,7 @@ gfc_match_if (gfc_statement *if_type)
16631659
gfc_free_expr (expr);
16641660
return MATCH_ERROR;
16651661
}
1662+
16661663
/* At this point, we've matched the single IF and the action clause
16671664
is in new_st. Rearrange things so that the IF statement appears
16681665
in new_st. */
@@ -3346,136 +3343,6 @@ gfc_match_fail_image (void)
33463343
return MATCH_ERROR;
33473344
}
33483345

3349-
/* Match a FORM TEAM statement. */
3350-
3351-
match
3352-
gfc_match_form_team (void)
3353-
{
3354-
match m;
3355-
gfc_expr *teamid,*team;
3356-
3357-
if (!gfc_notify_std (GFC_STD_F2008_TS, "FORM TEAM statement at %C"))
3358-
return MATCH_ERROR;
3359-
3360-
if (gfc_match_char ('(') == MATCH_NO)
3361-
goto syntax;
3362-
3363-
new_st.op = EXEC_FORM_TEAM;
3364-
3365-
if (gfc_match ("%e", &teamid) != MATCH_YES)
3366-
goto syntax;
3367-
m = gfc_match_char (',');
3368-
if (m == MATCH_ERROR)
3369-
goto syntax;
3370-
if (gfc_match ("%e", &team) != MATCH_YES)
3371-
goto syntax;
3372-
3373-
m = gfc_match_char (')');
3374-
if (m == MATCH_NO)
3375-
goto syntax;
3376-
3377-
new_st.expr1 = teamid;
3378-
new_st.expr2 = team;
3379-
3380-
return MATCH_YES;
3381-
3382-
syntax:
3383-
gfc_syntax_error (ST_FORM_TEAM);
3384-
3385-
return MATCH_ERROR;
3386-
}
3387-
3388-
/* Match a CHANGE TEAM statement. */
3389-
3390-
match
3391-
gfc_match_change_team (void)
3392-
{
3393-
match m;
3394-
gfc_expr *team;
3395-
3396-
if (!gfc_notify_std (GFC_STD_F2008_TS, "CHANGE TEAM statement at %C"))
3397-
return MATCH_ERROR;
3398-
3399-
if (gfc_match_char ('(') == MATCH_NO)
3400-
goto syntax;
3401-
3402-
new_st.op = EXEC_CHANGE_TEAM;
3403-
3404-
/* if (gfc_match ("%e", &teamid) != MATCH_YES) */
3405-
/* goto syntax; */
3406-
/* m = gfc_match_char (','); */
3407-
/* if (m == MATCH_ERROR) */
3408-
/* goto syntax; */
3409-
if (gfc_match ("%e", &team) != MATCH_YES)
3410-
goto syntax;
3411-
3412-
m = gfc_match_char (')');
3413-
if (m == MATCH_NO)
3414-
goto syntax;
3415-
3416-
new_st.expr1 = team;
3417-
3418-
return MATCH_YES;
3419-
3420-
syntax:
3421-
gfc_syntax_error (ST_CHANGE_TEAM);
3422-
3423-
return MATCH_ERROR;
3424-
}
3425-
3426-
/* Match a END TEAM statement. */
3427-
3428-
match
3429-
gfc_match_end_team (void)
3430-
{
3431-
if (!gfc_notify_std (GFC_STD_F2008_TS, "END TEAM statement at %C"))
3432-
return MATCH_ERROR;
3433-
3434-
if (gfc_match_char ('(') == MATCH_YES)
3435-
goto syntax;
3436-
3437-
new_st.op = EXEC_END_TEAM;
3438-
3439-
return MATCH_YES;
3440-
3441-
syntax:
3442-
gfc_syntax_error (ST_END_TEAM);
3443-
3444-
return MATCH_ERROR;
3445-
}
3446-
3447-
/* Match a SYNC TEAM statement. */
3448-
3449-
match
3450-
gfc_match_sync_team (void)
3451-
{
3452-
match m;
3453-
gfc_expr *team;
3454-
3455-
if (!gfc_notify_std (GFC_STD_F2008_TS, "SYNC TEAM statement at %C"))
3456-
return MATCH_ERROR;
3457-
3458-
if (gfc_match_char ('(') == MATCH_NO)
3459-
goto syntax;
3460-
3461-
new_st.op = EXEC_SYNC_TEAM;
3462-
3463-
if (gfc_match ("%e", &team) != MATCH_YES)
3464-
goto syntax;
3465-
3466-
m = gfc_match_char (')');
3467-
if (m == MATCH_NO)
3468-
goto syntax;
3469-
3470-
new_st.expr1 = team;
3471-
3472-
return MATCH_YES;
3473-
3474-
syntax:
3475-
gfc_syntax_error (ST_SYNC_TEAM);
3476-
3477-
return MATCH_ERROR;
3478-
}
34793346

34803347
/* Match LOCK/UNLOCK statement. Syntax:
34813348
LOCK ( lock-variable [ , lock-stat-list ] )

0 commit comments

Comments
 (0)