1! RUN: %python %S/test_errors.py %s %flang_fc1 2! This test checks for errors in sync team statements based on the 3! statement specification in section 11.6.6 of the Fortran 2018 standard. 4 5program test_sync_team 6 use iso_fortran_env, only : team_type 7 implicit none 8 9 integer sync_status 10 character(len=128) error_message 11 type(team_type) warriors 12 13 !___ standard-conforming statement ___ 14 15 sync team(warriors) 16 sync team(warriors, stat=sync_status) 17 sync team(warriors, errmsg=error_message) 18 sync team(warriors, stat=sync_status, errmsg=error_message) 19 20 !___ non-standard-conforming statement ___ 21 22 !______ missing team-value _____________________ 23 24 !ERROR: expected '(' 25 sync team 26 27 !ERROR: expected ')' 28 sync team(stat=sync_status, errmsg=error_message) 29 30 !______ invalid sync-stat-lists: invalid stat= ____________ 31 32 !ERROR: expected ')' 33 sync team(warriors, status=sync_status) 34 35 ! Invalid sync-stat-list: missing stat-variable 36 !ERROR: expected ')' 37 sync team(warriors, stat) 38 39 ! Invalid sync-stat-list: missing 'stat=' 40 !ERROR: expected ')' 41 sync team(warriors, sync_status) 42 43 !______ invalid sync-stat-lists: invalid errmsg= ____________ 44 45 ! Invalid errmsg-variable keyword 46 !ERROR: expected ')' 47 sync team(warriors, errormsg=error_message) 48 49 ! Invalid sync-stat-list: missing 'errmsg=' 50 !ERROR: expected ')' 51 sync team(warriors, error_message) 52 53 ! Invalid sync-stat-list: missing errmsg-variable 54 !ERROR: expected ')' 55 sync team(warriors, errmsg) 56 57end program test_sync_team 58