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
77 lines
2.0 KiB
Fortran
77 lines
2.0 KiB
Fortran
! RUN: %python %S/test_errors.py %s %flang_fc1 -funsigned
|
|
|
|
implicit unsigned(u)
|
|
real a(10)
|
|
|
|
!ERROR: Must have INTEGER type, but is UNSIGNED(4)
|
|
real(kind=4u) x
|
|
|
|
!ERROR: Both operands must be UNSIGNED
|
|
print *, 0 + 1u
|
|
!ERROR: Both operands must be UNSIGNED
|
|
print *, 0u + 1
|
|
!ERROR: Both operands must be UNSIGNED
|
|
print *, 0. + 1u
|
|
!ERROR: Both operands must be UNSIGNED
|
|
print *, 0u + 1.
|
|
|
|
print *, -0u ! ok
|
|
print *, 0u + 1u ! ok
|
|
print *, 0u - 1u ! ok
|
|
print *, 0u * 1u ! ok
|
|
print *, 0u / 1u ! ok
|
|
print *, 0u ** 1u ! ok
|
|
|
|
print *, uint((0.,0.)) ! ok
|
|
print *, uint(z'123') ! ok
|
|
!ERROR: Actual argument for 'a=' has bad type 'CHARACTER(KIND=1,LEN=1_8)'
|
|
print *, uint("a")
|
|
!ERROR: Actual argument for 'a=' has bad type 'LOGICAL(4)'
|
|
print *, uint(.true.)
|
|
!ERROR: Actual argument for 'l=' has bad type 'UNSIGNED(4)'
|
|
print *, logical(0u)
|
|
!ERROR: Actual argument for 'i=' has bad type 'UNSIGNED(4)'
|
|
print *, char(0u)
|
|
|
|
!ERROR: DO controls should be INTEGER
|
|
!ERROR: DO controls should be INTEGER
|
|
!ERROR: DO controls should be INTEGER
|
|
do u = 0u, 1u
|
|
end do
|
|
!ERROR: DO controls should be INTEGER
|
|
do u = 0, 1
|
|
end do
|
|
!ERROR: DO controls should be INTEGER
|
|
!ERROR: DO controls should be INTEGER
|
|
do j = 0u, 1u
|
|
end do
|
|
|
|
select case (u) ! ok
|
|
case(0u) ! ok
|
|
!ERROR: CASE value has type 'INTEGER(4)' which is not compatible with the SELECT CASE expression's type 'UNSIGNED(4)'
|
|
case(1)
|
|
end select
|
|
|
|
select case (j)
|
|
!ERROR: CASE value has type 'UNSIGNED(4)' which is not compatible with the SELECT CASE expression's type 'INTEGER(4)'
|
|
case(0u)
|
|
end select
|
|
|
|
u = z'1' ! ok
|
|
!ERROR: No intrinsic or user-defined ASSIGNMENT(=) matches operand types UNSIGNED(4) and INTEGER(4)
|
|
u = 1
|
|
!ERROR: No intrinsic or user-defined ASSIGNMENT(=) matches operand types INTEGER(4) and UNSIGNED(4)
|
|
j = 1u
|
|
|
|
!ERROR: I/O unit must be a character variable or a scalar integer expression, but is an expression of type UNSIGNED(4)
|
|
write(6u,*) 'hi'
|
|
|
|
!ERROR: ARITHMETIC IF expression must not be an UNSIGNED expression
|
|
if (1u) 1,1,1
|
|
1 continue
|
|
|
|
!ERROR: Must have INTEGER type, but is UNSIGNED(4)
|
|
print *, a(u)
|
|
|
|
end
|