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
1.9 KiB
Fortran
67 lines
1.9 KiB
Fortran
! RUN: %python %S/test_errors.py %s %flang_fc1
|
|
! TODO: crashes compiler mysteriously when built with MSVC since patch
|
|
! 10b990a03b1ede533b8443edffa3607aae4295c7n or maybe earlier
|
|
! UNSUPPORTED: system-windows
|
|
|
|
!Shape analysis related tests for SELECT RANK Construct(R1148)
|
|
program select_rank
|
|
implicit none
|
|
integer, dimension(2,3):: arr_pass
|
|
call check(arr_pass)
|
|
|
|
contains
|
|
subroutine check(arr)
|
|
implicit none
|
|
integer :: arr(..)
|
|
INTEGER :: j
|
|
select rank (arr)
|
|
rank(2)
|
|
j = INT(0, KIND=MERGE(KIND(0), -1, SIZE(SHAPE(arr)) == 2)) !arr is dummy
|
|
end select
|
|
end subroutine
|
|
subroutine check2(arr)
|
|
implicit none
|
|
integer :: arr(..)
|
|
INTEGER :: j
|
|
integer,dimension(-1:10, 20:30) :: brr
|
|
|
|
select rank (arr)
|
|
rank(2)
|
|
j = INT(0, KIND=MERGE(KIND(0), -1, SIZE(SHAPE(brr)) == 2)) !brr is local to subroutine
|
|
end select
|
|
end subroutine
|
|
subroutine checK3(arr)
|
|
implicit none
|
|
integer :: arr(..)
|
|
INTEGER :: j,I,n=5,m=5
|
|
integer,dimension(-1:10, 20:30) :: brr
|
|
integer :: array(2) = [10,20]
|
|
REAL, DIMENSION(5, 5) :: A
|
|
select rank (arr)
|
|
rank(2)
|
|
FORALL (i=1:n,j=1:m,RANK(arr).EQ.SIZE(SHAPE(brr))) &
|
|
A(i,j) = 1/A(i,j)
|
|
end select
|
|
end subroutine
|
|
subroutine check4(arr)
|
|
implicit none
|
|
integer :: arr(..)
|
|
REAL, DIMENSION(2,3) :: A
|
|
REAL, DIMENSION(0:1,0:2) :: B
|
|
INTEGER :: j
|
|
select rank (arr)
|
|
rank(2)
|
|
A = B !will assign to only same shape after analysing in any order.
|
|
end select
|
|
end subroutine
|
|
subroutine check5(arr)
|
|
implicit none
|
|
integer :: arr(..)
|
|
INTEGER :: j
|
|
select rank (arr)
|
|
rank(2)
|
|
j = LOC(arr(1,2))
|
|
end select
|
|
end subroutine
|
|
end program
|