58 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12! This test checks for errors in sync team statements based on the3! statement specification in section 11.6.6 of the Fortran 2018 standard.4 5program test_sync_team6 use iso_fortran_env, only : team_type7 implicit none8 9 integer sync_status10 character(len=128) error_message11 type(team_type) warriors12 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 team26 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-variable36 !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 keyword46 !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-variable54 !ERROR: expected ')'55 sync team(warriors, errmsg)56 57end program test_sync_team58