CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
72 lines
2.2 KiB
Fortran
72 lines
2.2 KiB
Fortran
! RUN: %python %S/test_errors.py %s %flang_fc1
|
|
! Check for semantic errors in change team statements.
|
|
! Only those semantics which differ from those of FORM TEAM statements are checked.
|
|
|
|
subroutine test
|
|
use, intrinsic :: iso_fortran_env, only: team_type
|
|
save
|
|
type(team_type) :: team
|
|
integer, codimension[*] :: selector
|
|
integer, codimension[2,*] :: selector2d
|
|
|
|
! Valid invocations which should produce no errors.
|
|
block
|
|
change team (team)
|
|
end team
|
|
construct1: change team (team)
|
|
end team construct1
|
|
change team (team, ca[*] => selector)
|
|
end team
|
|
change team (team, ca[2,*] => selector)
|
|
end team
|
|
change team (team, ca[*] => selector)
|
|
end team
|
|
change team (team, ca[*] => selector, ca2[2,*] => selector2d)
|
|
end team
|
|
end block
|
|
|
|
!A selector may appear only once in selector-list.
|
|
! ERROR: Selector 'selector' was already used as a selector or coarray in this statement
|
|
change team (team, ca[*] => selector, ca2[*] => selector)
|
|
end team
|
|
|
|
! Within a CHANGE TEAM construct, a CYCLE or EXIT statement is not allowed if it belongs to an outer construct.
|
|
block
|
|
outer1: if (.true.) then
|
|
change team (team)
|
|
if (.true.) then
|
|
! ERROR: EXIT must not leave a CHANGE TEAM statement
|
|
exit outer1
|
|
end if
|
|
end team
|
|
end if outer1
|
|
end block
|
|
block
|
|
outer2: do
|
|
change team (team)
|
|
! ERROR: CYCLE must not leave a CHANGE TEAM statement
|
|
cycle outer2
|
|
end team
|
|
end do outer2
|
|
end block
|
|
|
|
! The construct name must not be the same as any other construct name in the scoping unit.
|
|
block
|
|
construct2: block
|
|
end block construct2
|
|
! ERROR: 'construct2' is already declared in this scoping unit
|
|
construct2: change team (team)
|
|
end team construct2
|
|
end block
|
|
|
|
! When the CHANGE TEAM statement is executed, the selectors must all be established coarrays.
|
|
! ERROR: Selector in coarray association must name a coarray
|
|
change team (team, ca[*] => not_selector)
|
|
end team
|
|
|
|
! The coarray name in a coarray-association must not be the same as the name as the name of another coarray or of a selector in the CHANGE TEAM statement.
|
|
! ERROR: 'selector' is not an object that can appear in an expression
|
|
change team (team, selector[*] => selector)
|
|
end team
|
|
end subroutine
|