Files
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

56 lines
2.6 KiB
Fortran

! RUN: bbc -emit-hlfir %s -o - | FileCheck %s
! CHECK-LABEL: func @_QPtest1(
! CHECK-SAME: %[[VAL_0:.*]]: !fir.ref<!fir.array<100xf32>>{{.*}}, %[[VAL_1:.*]]: !fir.ref<i32>{{.*}}, %[[VAL_2:.*]]: !fir.ref<i32>{{.*}}, %[[VAL_3:.*]]: !fir.ref<i32>{{.*}}) {
! CHECK: %[[VAL_4:.*]] = arith.constant 100 : index
! CHECK: %[[VAL_5:.*]] = fir.shape %[[VAL_4]] : (index) -> !fir.shape<1>
! CHECK: %[[VAL_6:.*]]:2 = hlfir.declare %[[VAL_0]](%[[VAL_5]]) {{.*}}
! CHECK: %[[VAL_7:.*]]:2 = hlfir.declare %[[VAL_1]] {{.*}}
! CHECK: %[[VAL_8:.*]]:2 = hlfir.declare %[[VAL_2]] {{.*}}
! CHECK: %[[VAL_9:.*]]:2 = hlfir.declare %[[VAL_3]] {{.*}}
! CHECK: %[[VAL_10:.*]] = fir.load %[[VAL_7]]#0 : !fir.ref<i32>
! CHECK: %[[VAL_11:.*]] = fir.convert %[[VAL_10]] : (i32) -> i64
! CHECK: %[[VAL_12:.*]] = fir.load %[[VAL_8]]#0 : !fir.ref<i32>
! CHECK: %[[VAL_13:.*]] = fir.convert %[[VAL_12]] : (i32) -> i64
! CHECK: %[[VAL_14:.*]] = fir.convert %[[VAL_11]] : (i64) -> index
! CHECK: %[[VAL_15:.*]] = fir.convert %[[VAL_13]] : (i64) -> index
! CHECK: %[[VAL_16:.*]] = fir.load %[[VAL_9]]#0 : !fir.ref<i32>
! CHECK: %[[VAL_17:.*]] = fir.convert %[[VAL_16]] : (i32) -> i64
! CHECK: %[[VAL_18:.*]] = fir.convert %[[VAL_17]] : (i64) -> index
! CHECK: %[[VAL_19:.*]] = hlfir.designate %[[VAL_6]]#0 (%[[VAL_14]]:%[[VAL_15]]:%[[VAL_18]]) shape %{{.*}} : (!fir.ref<!fir.array<100xf32>>, index, index, index, !fir.shape<1>) -> !fir.box<!fir.array<?xf32>>
! CHECK: %[[VAL_20:.*]]:2 = hlfir.declare %[[VAL_19]] {{.*}}
! CHECK: fir.call @_QPbob(%[[VAL_20]]#0) {{.*}}: (!fir.box<!fir.array<?xf32>>) -> ()
! CHECK: return
! CHECK: }
subroutine test1(a,i,j,k)
real a(100)
integer i, j, k
interface
subroutine bob(a)
real :: a(:)
end subroutine bob
end interface
associate (name => a(i:j:k))
call bob(name)
end associate
end subroutine test1
! CHECK-LABEL: func @_QPtest2(
! CHECK-SAME: %[[nadd:.*]]: !fir.ref<i32>{{.*}})
subroutine test2(n)
integer :: n
integer, external :: foo
! CHECK: %[[n_decl:.*]]:2 = hlfir.declare %[[nadd]] {{.*}}
! CHECK: %[[n:.*]] = fir.load %[[n_decl]]#0 : !fir.ref<i32>
! CHECK: %[[n10:.*]] = arith.addi %[[n]], %c10{{.*}} : i32
! CHECK: fir.store %[[n10]] to %{{.*}} : !fir.ref<i32>
! CHECK: %[[foo:.*]] = fir.call @_QPfoo(%{{.*}}) {{.*}}: (!fir.ref<i32>) -> i32
! CHECK: fir.store %[[foo]] to %{{.*}} : !fir.ref<i32>
associate (i => n, j => n + 10, k => foo(20))
print *, i, j, k, n
end associate
end subroutine test2