6c1ac141d3
To enable Flang testing on Windows, shell scripts have to be ported to Python. In this patch the "test_errors.sh" script is ported to python ("test_errors.py"). The RUN line of existing tests was changed to make use of the python script. Used python regex in place of awk/sed. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D107575
31 lines
686 B
Fortran
31 lines
686 B
Fortran
! RUN: %python %S/test_errors.py %s %flang_fc1
|
|
! Test coarray association in CHANGE TEAM statement
|
|
|
|
subroutine s1
|
|
use iso_fortran_env
|
|
type(team_type) :: t
|
|
complex :: x[*]
|
|
real :: y[*]
|
|
real :: z
|
|
! OK
|
|
change team(t, x[*] => y)
|
|
end team
|
|
! C1116
|
|
!ERROR: Selector in coarray association must name a coarray
|
|
change team(t, x[*] => 1)
|
|
end team
|
|
!ERROR: Selector in coarray association must name a coarray
|
|
change team(t, x[*] => z)
|
|
end team
|
|
end
|
|
|
|
subroutine s2
|
|
use iso_fortran_env
|
|
type(team_type) :: t
|
|
real :: y[10,*], y2[*], x[*]
|
|
! C1113
|
|
!ERROR: The codimensions of 'x' have already been declared
|
|
change team(t, x[10,*] => y, x[*] => y2)
|
|
end team
|
|
end
|