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
105 lines
2.3 KiB
Plaintext
105 lines
2.3 KiB
Plaintext
! RUN: %python %S/test_errors.py %s %flang_fc1 -fopenacc
|
|
|
|
module devicemod
|
|
real, constant :: c(10)
|
|
end module
|
|
|
|
program test
|
|
use devicemod
|
|
real, device :: a(10)
|
|
real, managed :: m(10)
|
|
a = 1.0
|
|
!ERROR: device data not allowed in I/O statements
|
|
print *, a(1)
|
|
!ERROR: device data not allowed in I/O statements
|
|
print *, a
|
|
|
|
print*, m(9) ! ok
|
|
print*, m ! ok
|
|
|
|
!ERROR: device data not allowed in I/O statements
|
|
print*, c
|
|
!ERROR: device data not allowed in I/O statements
|
|
print*, c(5)
|
|
end
|
|
|
|
subroutine host()
|
|
integer :: i
|
|
real, device :: a(10)
|
|
!$acc parallel loop
|
|
do i = 1, 10
|
|
print*, a(i) ! ok
|
|
end do
|
|
|
|
!$cuf kernel do
|
|
do i = 1, 10
|
|
print*, a(i) ! ok
|
|
end do
|
|
end subroutine
|
|
|
|
attributes(global) subroutine global1()
|
|
real, device :: a(10)
|
|
print*, a ! ok
|
|
end subroutine
|
|
|
|
attributes(device) subroutine device1()
|
|
real, device :: a(10)
|
|
print*, a ! ok
|
|
end subroutine
|
|
|
|
attributes(global) subroutine global_with_block()
|
|
block
|
|
real, device :: a(10)
|
|
print*, a ! ok
|
|
end block
|
|
end subroutine
|
|
|
|
subroutine intrinsic_error(n)
|
|
integer :: n
|
|
real(8), device :: d(n,n), x(n)
|
|
!ERROR: Actual argument d associated with host intrinsic sum is on the device
|
|
x = sum(d,dim=2)
|
|
end subroutine
|
|
|
|
subroutine intrinsic_error_skipped(ws)
|
|
integer(8), device, optional :: ws(*)
|
|
integer(8) :: p
|
|
if (.not. present(ws)) then
|
|
print*, 'not present'
|
|
else
|
|
p = loc(ws(1))
|
|
end if
|
|
end subroutine
|
|
|
|
subroutine intrinsic_error_size(n)
|
|
integer :: n, x
|
|
real(8), device :: d(n,n)
|
|
x = size(d,dim=1) ! ok
|
|
x = sizeof(d) ! ok
|
|
end subroutine
|
|
|
|
subroutine intrinsic_error_skip_show_descriptor(n)
|
|
use flang_debug
|
|
real(8), allocatable, device :: d(:)
|
|
call show_descriptor(d) ! ok, descriptor in managed memory
|
|
end subroutine
|
|
|
|
double complex function acc_routine_check(n, x, y)
|
|
!$acc routine(acc_routine_check) vector
|
|
implicit none
|
|
integer :: n, i
|
|
double complex, device, dimension(*) :: x, y
|
|
double complex :: temp
|
|
intrinsic dconjg
|
|
|
|
!$acc loop vector reduction(+:temp)
|
|
do i = 1, n
|
|
! Check that the error message is not triggered since the subprogram has
|
|
! an OpenACC routine directive.
|
|
! Actual argument x associated with host intrinsic conjg is on the device
|
|
temp = temp + dconjg(x(i))*y(i)
|
|
end do
|
|
acc_routine_check = temp
|
|
return
|
|
end function acc_routine_check
|