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
82 lines
1.5 KiB
Fortran
82 lines
1.5 KiB
Fortran
!RUN: %python %S/../test_errors.py %s %flang -fopenmp -fopenmp-version=60
|
|
|
|
subroutine f00
|
|
integer :: x, v
|
|
! The end-directive is optional in ATOMIC WRITE. Expect no diagnostics.
|
|
!$omp atomic write
|
|
x = v + 1
|
|
|
|
!$omp atomic write
|
|
x = v + 3
|
|
!$omp end atomic
|
|
end
|
|
|
|
subroutine f01
|
|
integer, pointer :: x, v
|
|
! Intrinsic assignment and pointer assignment are both ok. Expect no
|
|
! diagnostics.
|
|
!$omp atomic write
|
|
x = 2 * v + 3
|
|
|
|
!$omp atomic write
|
|
x => v
|
|
end
|
|
|
|
subroutine f02(i)
|
|
integer :: i, v
|
|
interface
|
|
function p(i)
|
|
integer, pointer :: p
|
|
integer :: i
|
|
end
|
|
end interface
|
|
|
|
! Atomic variable can be a function reference. Expect no diagostics.
|
|
!$omp atomic write
|
|
p(i) = v
|
|
end
|
|
|
|
subroutine f03
|
|
integer :: x(3), y(5), v(3)
|
|
|
|
!$omp atomic write
|
|
!ERROR: Atomic variable x should be a scalar
|
|
x = v
|
|
|
|
!$omp atomic write
|
|
!ERROR: Atomic variable y(2_8:4_8:1_8) should be a scalar
|
|
y(2:4) = v
|
|
end
|
|
|
|
subroutine f04
|
|
integer :: x, y(3), v
|
|
|
|
!$omp atomic write
|
|
!ERROR: Within atomic operation x and x+1_4 access the same storage
|
|
x = x + 1
|
|
|
|
! Accessing same array, but not the same storage. Expect no diagnostics.
|
|
!$omp atomic write
|
|
y(1) = y(2)
|
|
end
|
|
|
|
subroutine f06
|
|
character :: x, v
|
|
|
|
!$omp atomic write
|
|
!ERROR: Atomic variable x cannot have CHARACTER type
|
|
x = v
|
|
end
|
|
|
|
subroutine f07
|
|
integer, allocatable :: x
|
|
integer :: v
|
|
|
|
allocate(x)
|
|
|
|
!$omp atomic write
|
|
!ERROR: Atomic variable x cannot be ALLOCATABLE
|
|
x = v
|
|
end
|
|
|