Files
TheRock/compiler/amd-llvm/flang/test/Semantics/sync-stat-list.f90
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

127 lines
4.8 KiB
Fortran

! RUN: %python %S/test_errors.py %s %flang_fc1
! There are sync-stat-lists in critical-stmt, sync-all-stmt,
! sync-images-stmt, sync-memory-stmt, sync-team-stmt,
! event-post-stmt, unlock-stmt, change-team-stmt, and end-change-team-stmt.
!
! Some of these statements have their sync-stat-lists tested in other tests.
! This test contains the statements that do not, namely critical-stmt, unlock-stmt,
! change-team-stmt, and end-change-team-stmt.
program test_sync_stat_list
use iso_fortran_env, only: team_type, lock_type
implicit none
integer coarray[*], sync_status, non_scalar(2), superfluous_stat, coindexed_integer[*]
character(len=128) error_message, superfluous_errmsg, coindexed_character[*]
logical invalid_type
type(team_type) :: home
type(lock_type) :: latch[*]
! valid
change team (home, stat=sync_status, errmsg=error_message)
end team (stat=sync_status, errmsg=error_message)
!ERROR: Must be a scalar value, but is a rank-1 array
change team (home, stat=non_scalar, errmsg=error_message)
end team
!ERROR: Must have INTEGER type, but is LOGICAL(4)
change team (home, stat=invalid_type, errmsg=error_message)
end team
!ERROR: Must have CHARACTER type, but is LOGICAL(4)
change team (home, stat=sync_status, errmsg=invalid_type)
end team
change team (home)
!ERROR: Must be a scalar value, but is a rank-1 array
end team (stat=non_scalar, errmsg=error_message)
change team (home)
!ERROR: Must have INTEGER type, but is LOGICAL(4)
end team (stat=invalid_type, errmsg=error_message)
change team (home)
!ERROR: Must have CHARACTER type, but is LOGICAL(4)
end team (stat=sync_status, errmsg=invalid_type)
!ERROR: The stat-variable in a sync-stat-list may not be repeated
change team (home, stat=sync_status, errmsg=error_message, stat=superfluous_stat)
end team
!ERROR: The errmsg-variable in a sync-stat-list may not be repeated
change team (home, stat=sync_status, errmsg=error_message, errmsg=superfluous_errmsg)
end team
change team (home)
!ERROR: The stat-variable in a sync-stat-list may not be repeated
end team (stat=sync_status, errmsg=error_message, stat=superfluous_stat)
change team (home)
!ERROR: The errmsg-variable in a sync-stat-list may not be repeated
end team (stat=sync_status, errmsg=error_message, errmsg=superfluous_errmsg)
!ERROR: The stat-variable or errmsg-variable in a sync-stat-list may not be a coindexed object
!ERROR: The stat-variable or errmsg-variable in a sync-stat-list may not be a coindexed object
change team (home, stat=coindexed_integer[1], errmsg=coindexed_character[1])
end team
change team (home)
!ERROR: The stat-variable or errmsg-variable in a sync-stat-list may not be a coindexed object
!ERROR: The stat-variable or errmsg-variable in a sync-stat-list may not be a coindexed object
end team (stat=coindexed_integer[1], errmsg=coindexed_character[1])
! valid
unlock (latch, stat=sync_status, errmsg=error_message)
!ERROR: Must be a scalar value, but is a rank-1 array
unlock (latch, stat=non_scalar, errmsg=error_message)
!ERROR: Must have INTEGER type, but is LOGICAL(4)
unlock (latch, stat=invalid_type, errmsg=error_message)
!ERROR: Must have CHARACTER type, but is LOGICAL(4)
unlock (latch, stat=sync_status, errmsg=invalid_type)
!ERROR: The stat-variable in a sync-stat-list may not be repeated
unlock (latch, stat=sync_status, stat=superfluous_stat)
!ERROR: The errmsg-variable in a sync-stat-list may not be repeated
unlock (latch, stat=sync_status, errmsg=error_message, errmsg=superfluous_errmsg)
!ERROR: The stat-variable or errmsg-variable in a sync-stat-list may not be a coindexed object
!ERROR: The stat-variable or errmsg-variable in a sync-stat-list may not be a coindexed object
unlock (latch, stat=coindexed_integer[1], errmsg=coindexed_character[1])
! valid
critical (stat=sync_status, errmsg=error_message)
end critical
!ERROR: Must be a scalar value, but is a rank-1 array
critical (stat=non_scalar, errmsg=error_message)
end critical
!ERROR: Must have INTEGER type, but is LOGICAL(4)
critical (stat=invalid_type, errmsg=error_message)
end critical
!ERROR: Must have CHARACTER type, but is LOGICAL(4)
critical (stat=sync_status, errmsg=invalid_type)
end critical
!ERROR: The stat-variable in a sync-stat-list may not be repeated
critical (stat=sync_status, errmsg=error_message, stat=superfluous_stat)
end critical
!ERROR: The errmsg-variable in a sync-stat-list may not be repeated
critical (stat=sync_status, errmsg=error_message, errmsg=superfluous_errmsg)
end critical
!ERROR: The stat-variable or errmsg-variable in a sync-stat-list may not be a coindexed object
!ERROR: The stat-variable or errmsg-variable in a sync-stat-list may not be a coindexed object
critical (stat=coindexed_integer[1], errmsg=coindexed_character[1])
end critical
end program test_sync_stat_list