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
67 lines
3.1 KiB
Fortran
67 lines
3.1 KiB
Fortran
! RUN: %python %S/test_errors.py %s %flang_fc1
|
|
! Check for semantic errors in form team statements
|
|
|
|
subroutine test
|
|
use, intrinsic :: iso_fortran_env, only: team_type
|
|
type(team_type) :: team
|
|
integer :: team_number
|
|
integer :: team_index
|
|
integer :: statvar
|
|
character(len=50) :: errvar
|
|
integer, codimension[*], save :: co_team_number, co_team_index
|
|
type(team_type), dimension(1) :: array_team
|
|
integer, dimension(1) :: array_team_number
|
|
integer, dimension(1) :: array_team_index
|
|
integer, dimension(1) :: array_statvar
|
|
character(len=50), dimension(1) :: array_errvar
|
|
|
|
logical :: invalid_argument
|
|
|
|
! Valid invocations which should produce no errors.
|
|
FORM TEAM (team_number, team)
|
|
! One form-team-spec argument.
|
|
FORM TEAM (team_number, team, NEW_INDEX=team_index)
|
|
FORM TEAM (team_number, team, STAT=statvar)
|
|
FORM TEAM (team_number, team, ERRMSG=errvar)
|
|
! Two form-team-spec arguments in any order.
|
|
FORM TEAM (team_number, team, NEW_INDEX=team_index, STAT=statvar)
|
|
FORM TEAM (team_number, team, STAT=statvar, NEW_INDEX=team_index)
|
|
FORM TEAM (team_number, team, NEW_INDEX=team_index, ERRMSG=errvar)
|
|
FORM TEAM (team_number, team, ERRMSG=errvar, NEW_INDEX=team_index)
|
|
FORM TEAM (team_number, team, STAT=statvar, ERRMSG=errvar)
|
|
FORM TEAM (team_number, team, ERRMSG=errvar, STAT=statvar)
|
|
! Three form-team-spec arguments in any order.
|
|
FORM TEAM (team_number, team, NEW_INDEX=team_index, STAT=statvar, ERRMSG=errvar) ! identity
|
|
FORM TEAM (team_number, team, STAT=statvar, NEW_INDEX=team_index, ERRMSG=errvar) ! transposition (1,2)
|
|
FORM TEAM (team_number, team, ERRMSG=errvar, STAT=statvar, NEW_INDEX=team_index) ! transposition (1,3)
|
|
FORM TEAM (team_number, team, NEW_INDEX=team_index, ERRMSG=errvar, STAT=statvar) ! transposition (2,3)
|
|
FORM TEAM (team_number, team, ERRMSG=errvar, NEW_INDEX=team_index, STAT=statvar) ! cycle (1,2,3)
|
|
FORM TEAM (team_number, team, STAT=statvar, ERRMSG=errvar, NEW_INDEX=team_index) ! cycle (1,3,2)
|
|
! It is semantically legal for team_index to be coindexed.
|
|
FORM TEAM (team_number, team, NEW_INDEX=co_team_index[this_image()])
|
|
|
|
! Semantically invalid invocations.
|
|
!ERROR: Must have INTEGER type, but is LOGICAL(4)
|
|
FORM TEAM (invalid_argument, team)
|
|
!ERROR: Must have INTEGER type, but is REAL(4)
|
|
FORM TEAM (0.0, team)
|
|
!ERROR: Must have INTEGER type, but is LOGICAL(4)
|
|
FORM TEAM (team_number, team, NEW_INDEX=invalid_argument)
|
|
!ERROR: Must have INTEGER type, but is LOGICAL(4)
|
|
FORM TEAM (team_number, team, STAT=invalid_argument)
|
|
!ERROR: Must have CHARACTER type, but is LOGICAL(4)
|
|
FORM TEAM (team_number, team, ERRMSG=invalid_argument)
|
|
|
|
! Arguments with rank mismatches.
|
|
!ERROR: Must be a scalar value, but is a rank-1 array
|
|
FORM TEAM (array_team_number, team)
|
|
!ERROR: Must be a scalar value, but is a rank-1 array
|
|
FORM TEAM (team_number, array_team)
|
|
!ERROR: Must be a scalar value, but is a rank-1 array
|
|
FORM TEAM (team_number, team, NEW_INDEX=array_team_index)
|
|
!ERROR: Must be a scalar value, but is a rank-1 array
|
|
FORM TEAM (team_number, team, STAT=array_statvar)
|
|
!ERROR: Must be a scalar value, but is a rank-1 array
|
|
FORM TEAM (team_number, team, ERRMSG=array_errvar)
|
|
end subroutine
|