AMDGPU: Allow f16/bf16 for DS_READ_TR16_B64 gfx950 builtins (#118297)
[llvm-project.git] / flang / test / Semantics / synchronization04b.f90
blob90ba504a33e9de1ef405c7a63d2b4d07d6a0b010
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! This test checks for semantic errors in sync team statements.
3 ! Some of the errors in this test would be hidden by the errors in
4 ! the test synchronization04a.f90 if they were included in that file,
5 ! and are thus tested here.
7 program test_sync_team
8 use iso_fortran_env, only : team_type
9 implicit none
11 integer sync_status, co_indexed_integer[*], superfluous_stat, non_scalar(1), not_a_team
12 character(len=128) error_message, co_indexed_character[*], superfluous_errmsg
13 logical invalid_type
14 type(team_type) warriors
16 !___ non-standard-conforming statements ___
18 !ERROR: Team value must be of type TEAM_TYPE from module ISO_FORTRAN_ENV
19 sync team(not_a_team)
21 !ERROR: Must have INTEGER type, but is LOGICAL(4)
22 sync team(warriors, stat=invalid_type)
24 !ERROR: Must be a scalar value, but is a rank-1 array
25 sync team(warriors, stat=non_scalar)
27 !ERROR: Must have CHARACTER type, but is LOGICAL(4)
28 sync team(warriors, errmsg=invalid_type)
30 !ERROR: The stat-variable in a sync-stat-list may not be repeated
31 sync team(warriors, stat=sync_status, stat=superfluous_stat)
33 !ERROR: The errmsg-variable in a sync-stat-list may not be repeated
34 sync team(warriors, errmsg=error_message, errmsg=superfluous_errmsg)
36 !ERROR: The stat-variable in a sync-stat-list may not be repeated
37 sync team(warriors, stat=sync_status, errmsg=error_message, stat=superfluous_stat)
39 !ERROR: The errmsg-variable in a sync-stat-list may not be repeated
40 sync team(warriors, stat=sync_status, errmsg=error_message, errmsg=superfluous_errmsg)
42 !ERROR: The stat-variable or errmsg-variable in a sync-stat-list may not be a coindexed object
43 sync team(warriors, stat=co_indexed_integer[1])
45 !ERROR: The stat-variable or errmsg-variable in a sync-stat-list may not be a coindexed object
46 sync team(warriors, errmsg=co_indexed_character[1])
48 end program test_sync_team