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
48 lines
1.5 KiB
Fortran
48 lines
1.5 KiB
Fortran
! RUN: %flang_fc1 -emit-hlfir -o - %s | FileCheck %s
|
|
|
|
module units
|
|
integer, parameter :: preconnected_unit(3) = [0, 5, 6]
|
|
contains
|
|
! CHECK-LABEL: func.func @_QMunitsPis_preconnected_unit
|
|
logical function is_preconnected_unit(u)
|
|
! CHECK: [[units_ssa:%[0-9]+]] = fir.address_of(@_QMunitsECpreconnected_unit) : !fir.ref<!fir.array<3xi32>>
|
|
! CHECK: [[units_decl:%[0-9]+]]:2 = hlfir.declare [[units_ssa]]
|
|
integer :: u
|
|
integer :: i
|
|
is_preconnected_unit = .true.
|
|
do i = lbound(preconnected_unit,1), ubound(preconnected_unit,1)
|
|
! CHECK: hlfir.designate [[units_decl]]#0
|
|
if (preconnected_unit(i) == u) return
|
|
end do
|
|
is_preconnected_unit = .false.
|
|
end function
|
|
end module units
|
|
|
|
! CHECK-LABEL: func.func @_QPcheck_units
|
|
subroutine check_units
|
|
use units
|
|
do i=-1,8
|
|
if (is_preconnected_unit(i)) print*, i
|
|
enddo
|
|
end
|
|
|
|
! CHECK-LABEL: func.func @_QPzero
|
|
subroutine zero
|
|
complex, parameter :: a(0) = [(((k,k=1,10),j=-2,2,-1),i=2,-2,-2)]
|
|
complex, parameter :: b(0) = [(7,i=3,-3)]
|
|
! CHECK: fir.address_of(@_QQro.0xz4.null.0) : !fir.ref<!fir.array<0xcomplex<f32>>>
|
|
! CHECK: hlfir.declare {{.*}} {fortran_attrs = #fir.var_attrs<parameter>, uniq_name = "_QQro.0xz4.null.0"}
|
|
print*, '>', a, '<'
|
|
print*, '>', b, '<'
|
|
end
|
|
|
|
! CHECK-LABEL: func.func @_QQmain
|
|
program prog
|
|
call check_units
|
|
call zero
|
|
end
|
|
|
|
! CHECK: fir.global internal @_QFzeroECa {alignment = 64 : i64} constant : !fir.array<0xcomplex<f32>>
|
|
! CHECK: %0 = fir.undefined !fir.array<0xcomplex<f32>>
|
|
! CHECK: fir.has_value %0 : !fir.array<0xcomplex<f32>>
|