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
53 lines
2.2 KiB
Fortran
53 lines
2.2 KiB
Fortran
! RUN: %python %S/test_errors.py %s %flang_fc1
|
|
! Check for semantic errors in ishftc() function calls
|
|
|
|
program test_ishftc
|
|
use iso_fortran_env, only: int8, int16, int32, int64
|
|
implicit none
|
|
|
|
integer :: n
|
|
integer, allocatable :: array_result(:)
|
|
integer, parameter :: const_arr1(2) = [-3,3]
|
|
integer, parameter :: const_arr2(2) = [3,0]
|
|
integer(kind=8), parameter :: const_arr3(2) = [0,4]
|
|
integer(kind=int8), parameter :: const_arr4(2) = [0,4]
|
|
integer(kind=int16), parameter :: const_arr5(2) = [0,4]
|
|
integer(kind=int32), parameter :: const_arr6(2) = [0,4]
|
|
integer(kind=int64), parameter :: const_arr7(2) = [0,4]
|
|
|
|
n = ishftc(3, 2, 3)
|
|
array_result = ishftc([3,3], [2,2], [3,3])
|
|
|
|
!ERROR: SIZE=-3 count for ishftc is not positive
|
|
n = ishftc(3, 2, -3)
|
|
!ERROR: SIZE=0 count for ishftc is not positive
|
|
n = ishftc(3, 2, 0)
|
|
!ERROR: SHIFT=2 count for ishftc is greater in magnitude than SIZE=1
|
|
n = ishftc(3, 2, 1)
|
|
!ERROR: SHIFT=-2 count for ishftc is greater in magnitude than SIZE=1
|
|
n = ishftc(3, -2, 1)
|
|
!ERROR: SHIFT=4 count for ishftc is greater in magnitude than SIZE=3
|
|
array_result = ishftc(666, [(j,integer::j=1,5)], 3)
|
|
!ERROR: SHIFT=4 count for ishftc is greater in magnitude than SIZE=3
|
|
array_result = ishftc(666, 4, [(j,integer::j=10,3,-1)])
|
|
!ERROR: SIZE=-3 count for ishftc is not positive
|
|
array_result = ishftc([3,3], [2,2], [-3,3])
|
|
!ERROR: SIZE=-3 count for ishftc is not positive
|
|
array_result = ishftc([3,3], [2,2], [-3,-3])
|
|
!ERROR: SIZE=-3 count for ishftc is not positive
|
|
array_result = ishftc([3,3], [-2,-2], const_arr1)
|
|
!ERROR: SIZE=0 count for ishftc is not positive
|
|
array_result = ishftc([3,3], [-2,-2], const_arr2)
|
|
!ERROR: SIZE=0 count for ishftc is not positive
|
|
array_result = ishftc([3,3], [-2,-2], const_arr3)
|
|
!ERROR: SIZE=0 count for ishftc is not positive
|
|
array_result = ishftc([3,3], [-2,-2], const_arr4)
|
|
!ERROR: SIZE=0 count for ishftc is not positive
|
|
array_result = ishftc([3,3], [-2,-2], const_arr5)
|
|
!ERROR: SIZE=0 count for ishftc is not positive
|
|
array_result = ishftc([3,3], [-2,-2], const_arr6)
|
|
!ERROR: SIZE=0 count for ishftc is not positive
|
|
array_result = ishftc([3,3], [-2,-2], const_arr7)
|
|
array_result = ishftc([(j,integer::j=1,0)], 10, 9) ! ok because empty
|
|
end program test_ishftc
|