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.
6 use iso_fortran_env
, only
: team_type
10 character(len
=128) error_message
11 type(team_type
) warriors
13 !___ standard-conforming statement ___
16 sync
team(warriors
, stat
=sync_status
)
17 sync
team(warriors
, errmsg
=error_message
)
18 sync
team(warriors
, stat
=sync_status
, errmsg
=error_message
)
20 !___ non-standard-conforming statement ___
22 !______ missing team-value _____________________
28 sync
team(stat
=sync_status
, errmsg
=error_message
)
30 !______ invalid sync-stat-lists: invalid stat= ____________
33 sync
team(warriors
, status
=sync_status
)
35 ! Invalid sync-stat-list: missing stat-variable
37 sync
team(warriors
, stat
)
39 ! Invalid sync-stat-list: missing 'stat='
41 sync
team(warriors
, sync_status
)
43 !______ invalid sync-stat-lists: invalid errmsg= ____________
45 ! Invalid errmsg-variable keyword
47 sync
team(warriors
, errormsg
=error_message
)
49 ! Invalid sync-stat-list: missing 'errmsg='
51 sync
team(warriors
, error_message
)
53 ! Invalid sync-stat-list: missing errmsg-variable
55 sync
team(warriors
, errmsg
)
57 end program test_sync_team