Files
TheRock/compiler/amd-llvm/flang/test/Lower/call-site-mangling.f90
T
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

118 lines
2.3 KiB
Fortran

! RUN: bbc %s -o "-" -emit-fir | FileCheck %s
subroutine sub()
real :: x
! CHECK: fir.call @_QPasubroutine()
call AsUbRoUtInE();
! CHECK: fir.call @_QPfoo()
x = foo()
end subroutine
module testMod
contains
subroutine sub()
end subroutine
function foo()
end function
end module
subroutine sub1()
use testMod
real :: x
! CHECK: fir.call @_QMtestmodPsub()
call Sub();
! CHECK: fir.call @_QMtestmodPfoo()
x = foo()
end subroutine
subroutine sub2()
use testMod, localfoo => foo, localsub => sub
real :: x
! CHECK: fir.call @_QMtestmodPsub()
call localsub();
! CHECK: fir.call @_QMtestmodPfoo()
x = localfoo()
end subroutine
subroutine sub3()
real :: x
! CHECK: fir.call @_QFsub3Psub()
call sub();
! CHECK: fir.call @_QFsub3Pfoo()
x = foo()
contains
subroutine sub()
end subroutine
function foo()
end function
end subroutine
function foo1()
real :: bar1
! CHECK: fir.call @_QPbar1()
foo1 = bar1()
end function
function foo2()
! CHECK: fir.call @_QPbar2()
foo2 = bar2()
end function
function foo3()
interface
real function bar3()
end function
end interface
! CHECK: fir.call @_QPbar3()
foo3 = bar3()
end function
function foo4()
external :: bar4
! CHECK: fir.call @_QPbar4()
foo4 = bar4()
end function
module test_bindmodule
contains
! CHECK: func @modulecproc()
! CHECK: func @bind_modulecproc()
subroutine modulecproc() bind(c)
end subroutine
subroutine modulecproc_1() bind(c, name="bind_modulecproc")
end subroutine
end module
! CHECK-LABEL: func @_QPtest_bindmodule_call() {
subroutine test_bindmodule_call
use test_bindmodule
interface
subroutine somecproc() bind(c)
end subroutine
subroutine somecproc_1() bind(c, name="bind_somecproc")
end subroutine
end interface
! CHECK: fir.call @modulecproc()
! CHECK: fir.call @bind_modulecproc()
! CHECK: fir.call @somecproc()
! CHECK: fir.call @bind_somecproc()
call modulecproc()
call modulecproc_1()
call somecproc()
call somecproc_1()
end subroutine
! CHECK-LABEL: func @_QPtest_bind_interface() {
subroutine test_bind_interface()
interface
subroutine some_bindc_iface() bind(C, name="some_name_some_foo_does_not_inherit")
end subroutine
end interface
procedure(some_bindc_iface) :: foo5
! CHECK: fir.call @foo5
call foo5()
end