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
49 lines
1.6 KiB
Fortran
49 lines
1.6 KiB
Fortran
! RUN: bbc %s -o "-" -emit-hlfir | FileCheck %s
|
|
|
|
subroutine sub1()
|
|
end
|
|
! CHECK-LABEL: func @_QPsub1()
|
|
|
|
subroutine sub2()
|
|
call sub1()
|
|
end
|
|
|
|
! CHECK-LABEL: func @_QPsub2()
|
|
! CHECK: fir.call @_QPsub1() {{.*}}: () -> ()
|
|
|
|
subroutine sub3(a, b)
|
|
integer :: a
|
|
real :: b
|
|
end
|
|
|
|
! CHECK-LABEL: func @_QPsub3(
|
|
! CHECK-SAME: %{{.*}}: !fir.ref<i32> {fir.bindc_name = "a"},
|
|
! CHECK-SAME: %{{.*}}: !fir.ref<f32> {fir.bindc_name = "b"})
|
|
|
|
subroutine sub4()
|
|
call sub3(2, 3.0)
|
|
end
|
|
|
|
! CHECK-LABEL: func @_QPsub4() {
|
|
! CHECK-DAG: %[[INT_VALUE:.*]]:3 = hlfir.associate %{{.*}} {adapt.valuebyref}
|
|
! CHECK-DAG: %[[REAL_VALUE:.*]]:3 = hlfir.associate %{{.*}} {adapt.valuebyref}
|
|
! CHECK: fir.call @_QPsub3(%[[INT_VALUE]]#0, %[[REAL_VALUE]]#0) {{.*}}: (!fir.ref<i32>, !fir.ref<f32>) -> ()
|
|
|
|
subroutine call_fct1()
|
|
real :: a, b, c
|
|
c = fct1(a, b)
|
|
end
|
|
|
|
! CHECK-LABEL: func @_QPcall_fct1()
|
|
! CHECK: %[[A:.*]] = fir.alloca f32 {bindc_name = "a", uniq_name = "_QFcall_fct1Ea"}
|
|
! CHECK: %[[A_DECL:.*]]:2 = hlfir.declare %[[A]] {{.*}}
|
|
! CHECK: %[[B:.*]] = fir.alloca f32 {bindc_name = "b", uniq_name = "_QFcall_fct1Eb"}
|
|
! CHECK: %[[B_DECL:.*]]:2 = hlfir.declare %[[B]] {{.*}}
|
|
! CHECK: %[[C:.*]] = fir.alloca f32 {bindc_name = "c", uniq_name = "_QFcall_fct1Ec"}
|
|
! CHECK: %[[C_DECL:.*]]:2 = hlfir.declare %[[C]] {{.*}}
|
|
! CHECK: %[[RES:.*]] = fir.call @_QPfct1(%[[A_DECL]]#0, %[[B_DECL]]#0) {{.*}}: (!fir.ref<f32>, !fir.ref<f32>) -> f32
|
|
! CHECK: hlfir.assign %[[RES]] to %[[C_DECL]]#0 : f32, !fir.ref<f32>
|
|
! CHECK: return
|
|
|
|
! CHECK: func private @_QPfct1(!fir.ref<f32>, !fir.ref<f32>) -> f32
|