1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Test selector and team-value in CHANGE TEAM statement
6 use iso_fortran_env
, only
: team_type
9 change
team(t
, x
[10,*] => y
)
17 real :: y
[10,*], y2
[*], x
[*]
19 !ERROR: Selector 'y' was already used as a selector or coarray in this statement
20 change
team(t
, x
[10,*] => y
, x2
[*] => y
)
22 !ERROR: Selector 'x' was already used as a selector or coarray in this statement
23 change
team(t
, x
[10,*] => y
, x2
[*] => x
)
25 !ERROR: Coarray 'y' was already used as a selector or coarray in this statement
26 change
team(t
, x
[10,*] => y
, y
[*] => y2
)
38 type(team_type
) :: t3(3)
41 !ERROR: Team value must be of type TEAM_TYPE from module ISO_FORTRAN_ENV
42 change
team(t1
, x
[10,*] => y
)
44 !ERROR: Team value must be of type TEAM_TYPE from module ISO_FORTRAN_ENV
45 change
team(t2
, x
[10,*] => y
)
47 !ERROR: Team value must be of type TEAM_TYPE from module ISO_FORTRAN_ENV
48 change
team(t2
%a
, x
[10,*] => y
)
50 !ERROR: Must be a scalar value, but is a rank-1 array
51 change
team(t3
, x
[10,*] => y
)
53 !ERROR: Team value must be of type TEAM_TYPE from module ISO_FORTRAN_ENV
55 !ERROR: Team value must be of type TEAM_TYPE from module ISO_FORTRAN_ENV
57 !ERROR: Team value must be of type TEAM_TYPE from module ISO_FORTRAN_ENV
59 !ERROR: Team value must be of type TEAM_TYPE from module ISO_FORTRAN_ENV
61 !ERROR: Must be a scalar value, but is a rank-1 array
66 use iso_fortran_env
, only
: team_type
69 type(team_type
) :: t
, t2(2)
71 !ERROR: Must be a scalar value, but is a rank-1 array
73 !ERROR: Must have INTEGER type, but is COMPLEX(4)
75 !ERROR: Must be a scalar value, but is a rank-1 array