@@ -1595,16 +1595,19 @@ 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 )
15981599 match ("close" , gfc_match_close , ST_CLOSE )
15991600 match ("continue" , gfc_match_continue , ST_CONTINUE )
16001601 match ("cycle" , gfc_match_cycle , ST_CYCLE )
16011602 match ("deallocate" , gfc_match_deallocate , ST_DEALLOCATE )
16021603 match ("end file" , gfc_match_endfile , ST_END_FILE )
1604+ match ("end team" , gfc_match_end_team , ST_END_TEAM )
16031605 match ("error stop" , gfc_match_error_stop , ST_ERROR_STOP )
16041606 match ("event post" , gfc_match_event_post , ST_EVENT_POST )
16051607 match ("event wait" , gfc_match_event_wait , ST_EVENT_WAIT )
16061608 match ("exit" , gfc_match_exit , ST_EXIT )
16071609 match ("fail image" , gfc_match_fail_image , ST_FAIL_IMAGE )
1610+ match ("form team" , gfc_match_form_team , ST_FORM_TEAM )
16081611 match ("flush" , gfc_match_flush , ST_FLUSH )
16091612 match ("forall" , match_simple_forall , ST_FORALL )
16101613 match ("go to" , gfc_match_goto , ST_GOTO )
@@ -1620,6 +1623,7 @@ gfc_match_if (gfc_statement *if_type)
16201623 match ("rewind" , gfc_match_rewind , ST_REWIND )
16211624 match ("stop" , gfc_match_stop , ST_STOP )
16221625 match ("wait" , gfc_match_wait , ST_WAIT )
1626+ match ("sync team" , gfc_match_sync_team , ST_SYNC_TEAM )
16231627 match ("sync all" , gfc_match_sync_all , ST_SYNC_CALL );
16241628 match ("sync images" , gfc_match_sync_images , ST_SYNC_IMAGES );
16251629 match ("sync memory" , gfc_match_sync_memory , ST_SYNC_MEMORY );
@@ -1659,7 +1663,6 @@ gfc_match_if (gfc_statement *if_type)
16591663 gfc_free_expr (expr );
16601664 return MATCH_ERROR ;
16611665 }
1662-
16631666 /* At this point, we've matched the single IF and the action clause
16641667 is in new_st. Rearrange things so that the IF statement appears
16651668 in new_st. */
@@ -3343,6 +3346,136 @@ gfc_match_fail_image (void)
33433346 return MATCH_ERROR ;
33443347}
33453348
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+ }
33463479
33473480/* Match LOCK/UNLOCK statement. Syntax:
33483481 LOCK ( lock-variable [ , lock-stat-list ] )
0 commit comments