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
56 lines
2.2 KiB
Fortran
56 lines
2.2 KiB
Fortran
! RUN: %python %S/test_errors.py %s %flang_fc1
|
|
! Check for semantic errors in ALLOCATE statements
|
|
|
|
program allocate14
|
|
|
|
integer, allocatable :: i1, i2
|
|
character(200), allocatable :: msg1, msg2
|
|
type t
|
|
integer, allocatable :: i
|
|
character(10), allocatable :: msg
|
|
end type t
|
|
type(t) :: tt(2)
|
|
type(t), allocatable :: ts(:)
|
|
|
|
allocate(i1)
|
|
allocate(msg1)
|
|
|
|
allocate(i2, stat=i1, errmsg=msg1)
|
|
allocate(msg2, stat=i1, errmsg=msg1)
|
|
deallocate(i2, stat=i1, errmsg=msg1)
|
|
deallocate(msg2, stat=i1, errmsg=msg1)
|
|
|
|
!ERROR: STAT variable in ALLOCATE must not be the variable being allocated
|
|
allocate(i2, stat=i2, errmsg=msg2)
|
|
!ERROR: ERRMSG variable in ALLOCATE must not be the variable being allocated
|
|
allocate(msg2, stat=i2, errmsg=msg2)
|
|
!ERROR: STAT variable in DEALLOCATE must not be the variable being deallocated
|
|
deallocate(i2, stat=i2, errmsg=msg2)
|
|
!ERROR: ERRMSG variable in DEALLOCATE must not be the variable being deallocated
|
|
deallocate(msg2, stat=i2, errmsg=msg2)
|
|
|
|
allocate(tt(1)%i)
|
|
allocate(tt(1)%msg)
|
|
|
|
allocate(tt(2)%i, stat=tt(1)%i, errmsg=tt(1)%msg)
|
|
allocate(tt(2)%msg, stat=tt(1)%i, errmsg=tt(1)%msg)
|
|
deallocate(tt(2)%i, stat=tt(1)%i, errmsg=tt(1)%msg)
|
|
deallocate(tt(2)%msg, stat=tt(1)%i, errmsg=tt(1)%msg)
|
|
|
|
!ERROR: STAT variable in ALLOCATE must not be the variable being allocated
|
|
allocate(tt(2)%i, stat=tt(2)%i, errmsg=tt(2)%msg)
|
|
!ERROR: ERRMSG variable in ALLOCATE must not be the variable being allocated
|
|
allocate(tt(2)%msg, stat=tt(2)%i, errmsg=tt(2)%msg)
|
|
!ERROR: STAT variable in DEALLOCATE must not be the variable being deallocated
|
|
deallocate(tt(2)%i, stat=tt(2)%i, errmsg=tt(2)%msg)
|
|
!ERROR: ERRMSG variable in DEALLOCATE must not be the variable being deallocated
|
|
deallocate(tt(2)%msg, stat=tt(2)%i, errmsg=tt(2)%msg)
|
|
|
|
!TODO: STAT variable in ALLOCATE must not be the variable being allocated
|
|
!TODO: ERRMSG variable in ALLOCATE must not be the variable being allocated
|
|
allocate(ts(10), stat=ts(1)%i, errmsg=ts(1)%msg)
|
|
!TODO: STAT variable in DEALLOCATE must not be the variable being deallocated
|
|
!TODO: ERRMSG variable in DEALLOCATE must not be the variable being deallocated
|
|
deallocate(ts, stat=ts(1)%i, errmsg=ts(1)%msg)
|
|
end program
|