Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / resolve50.f90
blobcc4dc030a990598c8e93664e7714ae7474d66d42
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Test coarray association in CHANGE TEAM statement
4 subroutine s1
5 use iso_fortran_env
6 type(team_type) :: t
7 complex :: x[*]
8 real :: y[*]
9 real :: z
10 ! OK
11 change team(t, x[*] => y)
12 end team
13 ! C1116
14 !ERROR: Selector in coarray association must name a coarray
15 change team(t, x[*] => 1)
16 end team
17 !ERROR: Selector in coarray association must name a coarray
18 change team(t, x[*] => z)
19 end team
20 end
22 subroutine s2
23 use iso_fortran_env
24 type(team_type) :: t
25 real :: y[10,*], y2[*], x[*]
26 ! C1113
27 !ERROR: The codimensions of 'x' have already been declared
28 change team(t, x[10,*] => y, x[*] => y2)
29 end team
30 end