[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / resolve50.f90
bloba23cd195aa010878956c8bc63e66d6436a6fe0b0
1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
2 ! REQUIRES: shell
3 ! Test coarray association in CHANGE TEAM statement
5 subroutine s1
6 use iso_fortran_env
7 type(team_type) :: t
8 complex :: x[*]
9 real :: y[*]
10 real :: z
11 ! OK
12 change team(t, x[*] => y)
13 end team
14 ! C1116
15 !ERROR: Selector in coarray association must name a coarray
16 change team(t, x[*] => 1)
17 end team
18 !ERROR: Selector in coarray association must name a coarray
19 change team(t, x[*] => z)
20 end team
21 end
23 subroutine s2
24 use iso_fortran_env
25 type(team_type) :: t
26 real :: y[10,*], y2[*], x[*]
27 ! C1113
28 !ERROR: The codimensions of 'x' have already been declared
29 change team(t, x[10,*] => y, x[*] => y2)
30 end team
31 end